-
Notifications
You must be signed in to change notification settings - Fork 1.8k
JS: Improve graphql flow #20450
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: Improve graphql flow #20450
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
This PR improves GraphQL data flow analysis by adding support for tracking taint flow from GraphQL query sources and variables to resolver function parameters in the CodeQL JavaScript library.
- Adds taint flow modeling for the graphql library to track data from query sources to resolver parameters
- Includes test case demonstrating code injection vulnerability through GraphQL resolver
- Updates expected test results to reflect the new taint flow tracking
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| graph-ql.js | Test case showing GraphQL code injection vulnerability with eval in resolver |
| graph-ql.model.yml | Taint flow model for graphql library tracking source to resolver parameters |
| *.expected | Updated test expectations reflecting new taint flow detection |
| 2025-09-17-graphql-enhance.md | Release notes documenting the GraphQL analysis improvement |
| @@ -0,0 +1,36 @@ | |||
| const express = require('express'); | |||
Copilot
AI
Sep 17, 2025
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.
[nitpick] The filename 'graph-ql.js' uses a hyphen, but GraphQL is typically written as one word. Consider renaming to 'graphql.js' for consistency with the library name.
6113fa3 to
6d461d6
Compare
No description provided.