feat(scanner): add FastAPI and Flask HTTP route matchers#52
Closed
divyamagrawal06 wants to merge 2 commits into
Closed
feat(scanner): add FastAPI and Flask HTTP route matchers#52divyamagrawal06 wants to merge 2 commits into
divyamagrawal06 wants to merge 2 commits into
Conversation
Register noisy-tier matchers that surface decorator-defined routes when FastAPI or Flask usage is present in the file, skipping Python test paths via shared python-utils. Adds vulnerable-app fixtures and extends matchers.test.ts. Signed-off-by: divyamagrawal06 <ludicrouslytrue@gmail.com>
|
@divyamagrawal06 is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
| registry.register(githubWorkflowSecurityMatcher); | ||
|
|
||
| // Python web | ||
| registry.register(fastapiRouteMatcher); |
Author
|
Addressed by #53 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Added matchers for FastAPI and Flask routes, with small Python fixtures and matcher tests. The matchers are registered in the default scanner registry under a Python web section.
Why
Python web apps were under-covered by the default matcher set, especially for FastAPI/Flask route decorators. Also was highlighted in CONTRIBUTING.md.
Verification
pnpm testpasses - partially, 5 fail due to POSIX errors in Windows (already addressed by fix: update file path handling in RegexScannerDriver to use POSIX format. This change ensures consistent path representation across different operating systems. #29pnpm lintpassespnpm knippassesI picked https://github.com/ctfd/ctfd and https://github.com/open-webui/open-webui, mostly because they're something I've heard about or worked with.
Screenshots:




Notes for reviewer
Real-repo sanity checks:
CTFd: flask-route found 142 route decorators across 40 candidate files.
Open WebUI: fastapi-route found 469 route decorators across 31 candidate files.