Java: Validate all accesspaths except for Field.

This commit is contained in:
Michael Nebel
2023-03-21 10:50:26 +01:00
parent 6c0c06c963
commit 46ef954d5c
3 changed files with 22 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
import java
import semmle.code.java.dataflow.ExternalFlow
import semmle.code.java.dataflow.internal.AccessPathSyntax
import ModelValidation
private predicate getRelevantAccessPath(string path) {
summaryModel(_, _, _, _, _, _, path, _, _, _) or
summaryModel(_, _, _, _, _, _, _, path, _, _) or
sinkModel(_, _, _, _, _, _, path, _, _) or
sourceModel(_, _, _, _, _, _, path, _, _)
}
private class AccessPathsExternal extends AccessPath::Range {
AccessPathsExternal() { getRelevantAccessPath(this) }
}