Merged
Conversation
35f22b8 to
3a243d2
Compare
Contributor
There was a problem hiding this comment.
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
reviewed
Mar 21, 2025
Contributor
asgerf
left a comment
There was a problem hiding this comment.
Great to see these new sources! 🎉
Co-authored-by: Asger F <asgerf@github.com>
asgerf
approved these changes
Mar 21, 2025
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.
Added model as data support for
ApolloServerfrom@apollo/serverand similar packages.The DCA run yielded a very positive outcome, incorporating many new sources. 🎉