mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
Restrict field access to corresponding type
This commit is contained in:
@@ -96,8 +96,8 @@ class ParameterToFieldConfig extends TaintTracking::Configuration {
|
||||
override predicate isSink(DataFlow::Node sink) {
|
||||
exists(FieldAssignment a |
|
||||
a.getSource() = sink.asExpr() and
|
||||
a.getDest().(VarAccess).getVariable().getCompilationUnit() =
|
||||
sink.getEnclosingCallable().getCompilationUnit()
|
||||
a.getDest().(FieldAccess).getField().getDeclaringType() =
|
||||
sink.getEnclosingCallable().getDeclaringType()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user