Python: mass enable diff-informed data flow none() location overrides#19797
Merged
d10c merged 1 commit intogithub:mainfrom Jun 19, 2025
Merged
Python: mass enable diff-informed data flow none() location overrides#19797d10c merged 1 commit intogithub:mainfrom
none() location overrides#19797d10c merged 1 commit intogithub:mainfrom
Conversation
An auto-generated patch that enables diff-informed data flow in the obvious cases. Builds on github#18346 and github/codeql-patch#88
Contributor
There was a problem hiding this comment.
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() }
|
|
||
| predicate observeDiffInformedIncrementalMode() { any() } | ||
|
|
||
| Location getASelectedSourceLocation(DataFlow::Node sink) { none() } |
There was a problem hiding this comment.
[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.
tausbn
approved these changes
Jun 17, 2025
tausbn
approved these changes
Jun 17, 2025
Contributor
Author
|
Thanks! 🚀 |
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.
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.