-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Ruby: mass enable diff-informed data flow none()
location overrides
#19798
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
Conversation
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.
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
Enables diff-informed incremental data flow by overriding the selected-source location to none()
in configs that only select a dataflow source.
- Implement
getASelectedSourceLocation(DataFlow::Node)
override in BasicTaintConfig - Implement the same override in WeakParamsConfig
- Implement the same override in HttpVerbConfig
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
ruby/ql/src/queries/meta/TaintedNodes.ql | Added getASelectedSourceLocation override in BasicTaintConfig |
ruby/ql/src/experimental/weak-params/WeakParams.ql | Added getASelectedSourceLocation override in WeakParamsConfig |
ruby/ql/src/experimental/manually-check-http-verb/ManuallyCheckHttpVerb.ql | Added getASelectedSourceLocation override in HttpVerbConfig |
Comments suppressed due to low confidence (2)
ruby/ql/src/queries/meta/TaintedNodes.ql:25
- [nitpick] Add a brief comment explaining why
getASelectedSourceLocation
is overridden tonone()
in diff-informed incremental mode, to aid future maintainers.
Location getASelectedSourceLocation(DataFlow::Node source) { none() }
ruby/ql/src/queries/meta/TaintedNodes.ql:25
- No existing tests cover the new override behavior in diff-informed incremental mode; consider adding a unit test to verify that
getASelectedSourceLocation
returnsnone()
as expected.
Location getASelectedSourceLocation(DataFlow::Node source) { none() }
|
||
Location getASelectedSourceLocation(DataFlow::Node source) { 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 duplicated across multiple config modules; consider extracting it into a shared mixin or trait to reduce repetition.
Location getASelectedSourceLocation(DataFlow::Node source) { none() } | |
} | |
private module SharedTaintConfig { | |
Location getASelectedSourceLocation(DataFlow::Node source) { none() } | |
} | |
private module BasicTaintConfig implements DataFlow::ConfigSig, SharedTaintConfig { | |
} |
Copilot uses AI. Check for mistakes.
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.
LGTM!
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.