Skip to content
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

Data flow: Block flow at expectsContents nodes in parameterValueFlow #16110

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Apr 3, 2024

This PR adds expectsContents nodes as barriers in parameterValueFlow, just like we already do in revLambdaFlow. Otherwise, we can end up generating spurious local flow steps via reverseStepThroughInputOutputAlias, as documented with a Ruby test on this PR.

DCA is uneventful, except for a significant speedup on the Ruby project rapid7__metasploit-framework.

* `reverse` does not get picked up by the `reverseStepThroughInputOutputAlias`
* logic in `DataFlowImplCommon.qll`.
*/
query predicate noReverseStepThroughInputOutputAlias(DataFlow::Node source, DataFlow::Node sink) {

Check warning

Code scanning / CodeQL

Missing QLDoc for parameter Warning

The QLDoc has no documentation for sink, or source, but the QLDoc mentions reverseStepThroughInputOutputAlias
@hvitved hvitved force-pushed the dataflow/param-flow-no-expects-content branch from c5117cd to 5cc9fbb Compare April 3, 2024 17:29
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Apr 4, 2024
@hvitved hvitved force-pushed the dataflow/param-flow-no-expects-content branch from 5cc9fbb to 7871fb8 Compare April 4, 2024 07:15
@hvitved hvitved marked this pull request as ready for review April 4, 2024 07:16
@hvitved hvitved requested a review from a team as a code owner April 4, 2024 07:16
@hvitved hvitved requested a review from aschackmull April 4, 2024 07:16
@hvitved hvitved merged commit 5f8eb7b into github:main Apr 9, 2024
24 checks passed
@hvitved hvitved deleted the dataflow/param-flow-no-expects-content branch April 9, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DataFlow Library no-change-note-required This PR does not need a change note Ruby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants