mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
Python: Add alert provenance plumbing.
This commit is contained in:
@@ -157,12 +157,12 @@ class ExternalApiDataNode extends DataFlow::Node {
|
||||
ExternalApiDataNode() {
|
||||
exists(InterestingExternalApiCall call | this = call.getArgument(_)) and
|
||||
// Not already modeled as a taint step
|
||||
not TaintTrackingPrivate::defaultAdditionalTaintStep(this, _) and
|
||||
not TaintTrackingPrivate::defaultAdditionalTaintStep(this, _, _) and
|
||||
// for `list.append(x)`, we have a additional taint step from x -> [post] list.
|
||||
// Since we have modeled this explicitly, I don't see any cases where we would want to report this.
|
||||
not exists(DataFlow::PostUpdateNode post |
|
||||
post.getPreUpdateNode() = this and
|
||||
TaintTrackingPrivate::defaultAdditionalTaintStep(_, post)
|
||||
TaintTrackingPrivate::defaultAdditionalTaintStep(_, post, _)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user