Skip to content

Commit b0f7453

Browse files
committed
Node type restriction
1 parent 5be9fbb commit b0f7453

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.ql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ class UseOfLessTrustedSourceConfig extends TaintTracking::Configuration {
3535
ma.getMethod() instanceof SplitMethod and
3636
not aa.getIndexExpr().(CompileTimeConstantExpr).getIntValue() = 0
3737
)
38+
or
39+
node.getType().hasName("Object")
40+
or
41+
node.getType() instanceof PrimitiveType
42+
or
43+
node.getType() instanceof BoxedType
3844
}
3945
}
4046

0 commit comments

Comments
 (0)