Python: Better handling of sensitive functions

This solution was the best I could come up with, but it _is_ a bit
brittle since you need to remember to add this additional taint step
to any configuration that relies on sensitive data sources... I don't
see an easy way around this though :|
This commit is contained in:
Rasmus Wriedt Larsen
2021-06-10 15:07:03 +02:00
parent f167143a84
commit ea0c1d7db3
4 changed files with 60 additions and 6 deletions

View File

@@ -40,6 +40,10 @@ class SensitiveUseConfiguration extends TaintTracking::Configuration {
override predicate isSink(DataFlow::Node node) {
node = API::builtin("print").getACall().getArg(_)
}
override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) {
sensitiveDataExtraStepForCalls(node1, node2)
}
}
// import DataFlow::PathGraph
// from SensitiveUseConfiguration cfg, DataFlow::PathNode source, DataFlow::PathNode sink