-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Java: migrate taint steps to CSV #5329
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
90859bb
to
7f3b6e1
Compare
// wrappers constructed by extension | ||
exists(Constructor c, Parameter p, SuperConstructorInvocationStmt sup | | ||
c = sink.getConstructor() and |
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.
This should also cover constructors defined in summaryStep
.
d8c16c4
to
5b00bfd
Compare
summaryStep(any(DataFlow::Node n | n.asExpr() = tracked), | ||
any(DataFlow::Node n | n.asExpr() = sink), "taint", "Argument(" + argi + ")", "ReturnValue") | ||
or |
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.
This is super ugly.
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.
There should be no need for this if you change the constructor steps slightly: Instead of ReturnValue
, which only works for new
expressions, you can use Argument[-1]
, which is the value of this
for the constructor. This amounts to the same thing for new
expressions, but also works for other constructor calls such as this(..)
and super(..)
.
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.
Thanks. Did you mean it like this?
5507200
to
ebeb2a3
Compare
The differences job shows a bunch of new results, but the PR title indicates that this is merely intended to migrate steps to csv, so that seems like a bug. |
Yep, I saw them. I'll check them before marking this PR ready for review. |
@aschackmull I think the difference actually comes from a bug in the previous implementation. |
// wrappers constructed by extension | ||
exists(Constructor c, Parameter p, SuperConstructorInvocationStmt sup | | ||
c = sink.getConstructor() and | ||
p = c.getParameter(argi) and | ||
sup.getEnclosingCallable() = c and | ||
constructorStep(p.getAnAccess(), sup) | ||
) |
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.
We likely still need this as long as constructorStep
still contain other steps, since they likely aren't targeting the instance argument.
d8cb588
to
d02fba8
Compare
Differences job