Skip to content

Commit 3a2dd8f

Browse files
authored
Merge pull request github#4867 from RasmusWL/java-externalapis-taint-step
Java: Fix taint-step handling for untrusted-data-external-api
2 parents b794fcb + 00c253a commit 3a2dd8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/ql/src/semmle/code/java/security/ExternalAPIs.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ class ExternalAPIDataNode extends DataFlow::Node {
7575
m.getASourceOverriddenMethod() = call.getCallee().getSourceDeclaration() and
7676
m.fromSource()
7777
) and
78-
// Not already modeled as a taint step
78+
// Not already modeled as a taint step (we need both of these to handle `AdditionalTaintStep` subclasses as well)
7979
not exists(DataFlow::Node next | TaintTracking::localTaintStep(this, next)) and
80+
not exists(DataFlow::Node next | TaintTracking::defaultAdditionalTaintStep(this, next)) and
8081
// Not a call to a known safe external API
8182
not call.getCallee() instanceof SafeExternalAPIMethod
8283
}

0 commit comments

Comments
 (0)