-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Python: mass enable diff-informed data flow none()
location overrides
#19797
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
An auto-generated patch that enables diff-informed data flow in the obvious cases. Builds on github#18346 and github/codeql-patch#88
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 enables diff-informed data flow in several experimental Python security queries by adding getASelectedSourceLocation(...) { none() }
overrides where only source or sink locations are selected.
- Introduces an empty override for source location in diff-informed incremental mode.
- Applies the override consistently across four security analysis modules.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
python/ql/src/experimental/semmle/python/security/LdapInsecureAuth.qll | Added getASelectedSourceLocation override |
python/ql/src/experimental/Security/UnsafeUnpackQuery.qll | Added getASelectedSourceLocation override |
python/ql/src/experimental/Security/CWE-346/CorsBypass.ql | Added getASelectedSourceLocation override |
python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql | Added getASelectedSourceLocation override |
Comments suppressed due to low confidence (1)
python/ql/src/experimental/semmle/python/security/LdapInsecureAuth.qll:107
- Consider adding tests to verify that diff-informed incremental mode correctly skips source locations via this override.
Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
@@ -103,6 +103,8 @@ private module LdapInsecureAuthConfig implements DataFlow::ConfigSig { | |||
} | |||
|
|||
predicate observeDiffInformedIncrementalMode() { any() } | |||
|
|||
Location getASelectedSourceLocation(DataFlow::Node sink) { none() } |
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] This override is identical in multiple config modules; consider extracting a shared mixin or base module to provide the default none()
override and reduce duplication.
Copilot uses AI. Check for mistakes.
Thanks! 🚀 |
An auto-generated patch that enables diff-informed data flow in the obvious cases.
Adds
getASelected{Source,Sink}Location() { none() }
override to queries that select a dataflow source or sink as a location, but not both.