-
Notifications
You must be signed in to change notification settings - Fork 1.7k
JS: Modeling of aws-sdk
clients*
#20135
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
base: main
Are you sure you want to change the base?
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 adds modeling for SQL injection detection in AWS SDK clients for both v2 and v3 versions of the AWS SDK. The main purpose is to enable CodeQL to detect SQL injection vulnerabilities when using DynamoDB, S3, Athena, and RDS Data clients with user-provided input.
Key changes include:
- Addition of sink models for SQL injection detection across multiple AWS services
- Addition of source models for database access results (XSS detection)
- Comprehensive test coverage for both v2 and v3 AWS SDK versions
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
javascript/ql/lib/ext/aws-sdk.model.yml | Core modeling definitions for sinks, sources, and type mappings for AWS SDK clients |
javascript/ql/test/query-tests/Security/CWE-089/untyped/*.js | Test files demonstrating SQL injection vulnerabilities in various AWS services |
javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/aws-db.js | Test file for XSS vulnerabilities from AWS database responses |
javascript/ql/test/query-tests/Security/CWE-089/untyped/SqlInjection.expected | Expected test results for SQL injection detection |
javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected | Expected test results for XSS detection |
javascript/ql/lib/change-notes/2025-07-28-dynamodb.md | Release notes documenting the new AWS SDK support |
This PR adds modeling for v2 and v3 AWS SDK clients:
client-dynamodb
client-s3
client-athena
client-rds-data
Important notes:
accessPathLimit
to be at least 3:createNamedQuery
andupdateNamedQuery
in Athena are marked as sinks. They do not execute queries directly but store them for later execution in AWS Athena.