-
Notifications
You must be signed in to change notification settings - Fork 1.7k
JS: Modeling of fastify
#19439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JS: Modeling of fastify
#19439
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for Fastify’s all
method in both tests and the QL model so that routes registered with fastify.all
are treated like any HTTP method.
- Include a new
fastify.all('/eval', …)
test case and update expected results. - Extend
Fastify.qll
to recognize"all"
in route setups and adaptgetHttpMethod()
. - Document the addition in the change-notes.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/fastify.js | Add fastify.all('/eval', …) scenario |
javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/HeuristicSourceCodeInjection.expected | Update provenance edges/nodes for new test |
javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/CodeInjection.expected | Update expected alerts/provenance for new test |
javascript/ql/lib/semmle/javascript/frameworks/Fastify.qll | Include "all" in RouteSetup and modify getHttpMethod() |
javascript/ql/lib/change-notes/2025-04-30-fastify-all.md | Add note about all route handler support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit otherwise LGTM
Implements modeling of
Fastify
'sall
method which handles requests across all HTTP methods with a single route definition.