Skip to content

Conversation

@Napalys
Copy link
Contributor

@Napalys Napalys commented Mar 19, 2025

Added model as data support for ApolloServer from @apollo/server and similar packages.

The DCA run yielded a very positive outcome, incorporating many new sources. 🎉

@github-actions github-actions bot added the JS label Mar 19, 2025
@Napalys Napalys marked this pull request as ready for review March 20, 2025 18:10
Copilot AI review requested due to automatic review settings March 20, 2025 18:10
@Napalys Napalys requested a review from a team as a code owner March 20, 2025 18:10
Copy link
Contributor

Copilot AI left a 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

Copy link
Contributor

@asgerf asgerf left a 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! 🎉

@Napalys Napalys merged commit 7bd1c4d into github:main Mar 21, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants