mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Java: Add support for flow through side-effects on static fields.
This commit is contained in:
@@ -40,8 +40,11 @@ private predicate fieldStep(Node node1, Node node2) {
|
||||
exists(Field f |
|
||||
// Taint fields through assigned values only if they're static
|
||||
f.isStatic() and
|
||||
f.getAnAssignedValue() = node1.asExpr() and
|
||||
node2.(FieldValueNode).getField() = f
|
||||
|
|
||||
f.getAnAssignedValue() = node1.asExpr()
|
||||
or
|
||||
f.getAnAccess() = node1.(PostUpdateNode).getPreUpdateNode().asExpr()
|
||||
)
|
||||
or
|
||||
exists(Field f, FieldRead fr |
|
||||
|
||||
Reference in New Issue
Block a user