Skip to content

feat(scanner): add FastAPI and Flask HTTP route matchers#52

Closed
divyamagrawal06 wants to merge 2 commits into
vercel-labs:mainfrom
divyamagrawal06:feat/scanner-python-route-matchers
Closed

feat(scanner): add FastAPI and Flask HTTP route matchers#52
divyamagrawal06 wants to merge 2 commits into
vercel-labs:mainfrom
divyamagrawal06:feat/scanner-python-route-matchers

Conversation

@divyamagrawal06
Copy link
Copy Markdown

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

I 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:
image
image
image
image

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.

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

@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);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate FastAPI and Flask matchers registered in the default registry produce redundant candidate matches on every Python file using those frameworks.

Fix on Vercel

@divyamagrawal06
Copy link
Copy Markdown
Author

Addressed by #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant