-
Notifications
You must be signed in to change notification settings - Fork 1.9k
JS: model ApolloServer
#19060
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: model ApolloServer
#19060
Conversation
35f22b8 to
3a243d2
Compare
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
This PR adds support for modeling the ApolloServer usage from the @apollo/server package and related packages, including security test cases for request-forgery.
- Added a new test file with two variations of the downloadFiles resolver for security query tests.
- Introduced a YAML model extension to associate various ApolloServer package variants with specific source model definitions.
- Updated change notes to document the new ApolloServer support.
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| javascript/ql/test/query-tests/Security/CWE-918/apollo.serverSide.ts | Adds test cases for downloadFiles resolver with security annotations. |
| javascript/ql/lib/ext/apollo-server.model.yml | Provides model extensions mapping for the ApolloServer packages. |
| javascript/ql/lib/change-notes/2025-03-20-apollo-server.md | Notes the addition of support for ApolloServer from various packages. |
Files not reviewed (1)
- javascript/ql/test/query-tests/Security/CWE-918/RequestForgery.expected: Language not supported
Comments suppressed due to low confidence (1)
javascript/ql/test/query-tests/Security/CWE-918/apollo.serverSide.ts:17
- [nitpick] The second downloadFiles resolver lacks the usual source/alert annotations compared to the first one. If this is an intentional negative test case to verify analyzer behavior, consider adding an inline comment to clarify this intent for future maintainers.
downloadFiles: async (_, { files }) => { // $ MISSING: Source[js/request-forgery]
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
asgerf
left a comment
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.
Great to see these new sources! 🎉
Co-authored-by: Asger F <asgerf@github.com>
Added model as data support for
ApolloServerfrom@apollo/serverand similar packages.The DCA run yielded a very positive outcome, incorporating many new sources. 🎉