Skip to content

JS: model composed functions #115

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

Merged
merged 1 commit into from Aug 31, 2018
Merged

JS: model composed functions #115

merged 1 commit into from Aug 31, 2018

Conversation

ghost
Copy link

@ghost ghost commented Aug 29, 2018

This PR adds a taint step for the arguments and return values of composed functions.

In anticipation of a potential merge with a "partial function" model, I have made the implementation private for now.

An evaluation with the security suite on big-apps.slugs flags nothing new, and it does not have a significant performance impact (internal link).

@ghost ghost added the JS label Aug 29, 2018
@ghost ghost self-requested a review as a code owner August 29, 2018 10:47
@ghost ghost added this to the 1.18 milestone Aug 29, 2018
fn = composed.getFunction(fnIndex) |
// flow out of the composed call
fnIndex = composed.getNumArgument() - 1 and
pred = fn.getFunction().getAReturnedExpr().flow() and

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pred = fn.getAReturn()

// flow through the composed functions
exists (DataFlow::FunctionNode predFn |
predFn = composed.getFunction(fnIndex - 1) |
pred = predFn.getFunction().getAReturnedExpr().flow() and

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@ghost
Copy link
Author

ghost commented Aug 30, 2018

Amended

@xiemaisi
Copy link

Tests succeeded; merging.

@xiemaisi xiemaisi merged commit 69ca103 into github:master Aug 31, 2018
@ghost ghost mentioned this pull request Sep 3, 2018
aibaars added a commit that referenced this pull request Oct 14, 2021
smowton added a commit to smowton/codeql that referenced this pull request Dec 6, 2021
…n-modifiers

Add modifiers to array built-in functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant