Java/NumericCastTaintedQuery

java/ql/src/Security/CWE/CWE-681/NumericCastTainted.ql
This commit is contained in:
Nora Dimitrijević
2025-10-09 14:01:26 +02:00
parent 247ae1d23c
commit 72a97773b1

View File

@@ -106,8 +106,9 @@ module NumericCastFlowConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }
Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(NumericNarrowingCastExpr cast |
cast.getExpr() = sink.asExpr() and
exists(NumericNarrowingCastExpr cast | cast.getExpr() = sink.asExpr() |
result = sink.getLocation()
or
result = cast.getLocation()
)
}