Skip to content

Commit 4159e76

Browse files
committed
Java: ExternallyControlledFormatString
1 parent 1119e80 commit 4159e76

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringQuery.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ module ExternallyControlledFormatStringConfig implements DataFlow::ConfigSig {
2424
node.getType() instanceof NumericType or node.getType() instanceof BooleanType
2525
}
2626

27-
predicate observeDiffInformedIncrementalMode() {
28-
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 22 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatString.ql@24:8:24:37)
27+
predicate observeDiffInformedIncrementalMode() { any() }
28+
29+
Location getASelectedSinkLocation(DataFlow::Node sink) {
30+
exists(StringFormat formatCall | result = formatCall.getFormatArgument().getLocation() |
31+
sink.asExpr() = formatCall.getFormatArgument()
32+
)
2933
}
3034
}
3135

0 commit comments

Comments
 (0)