-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Python: Add taint-sinks meta query #11480
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
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.
Seems reasonable to me. 👍
DataFlow::Node relevantTaintSink(string kind) { | ||
not result.getLocation().getFile() instanceof IgnoredFile and | ||
( | ||
kind = "CleartextLogging" and result instanceof CleartextLogging::Sink |
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.
FYI: in JS I deliberately omitted logging-related sinks in this query, because it ends up dominating the number of sinks.
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.
I see two use-cases for this query:
- manually running it on a DB to see what interesting sinks have been found
- checking differences in sinks found from changes in a PR
For (1) it sounds very reasonable to exclude things that are not super interesting, like the cleartext-logging stuff, but for (2), which is the aim of this work, I would like to keep them.
Do you agree?
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.
Yes, sounds very reasonable.
or | ||
kind = "Xxe" and result instanceof Xxe::Sink |
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.
I wonder if there is a way of writing this that is easier to maintain. Something like
kind.(TaintTracking::Configuration).isSink(result)
(horribly abusing that Configurations are still strings).
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.
I guess we could write it this way, but I personally prefer the current approach -- especially since it will also work once configurations are no longer strings.
No description provided.