Java: Fix bug in model flow sanitizer.

This commit is contained in:
Anders Schack-Mulligen
2022-02-04 15:08:35 +01:00
committed by Michael Nebel
parent 16a5ccddea
commit 908cc40c9f
2 changed files with 3 additions and 2 deletions

View File

@@ -80,7 +80,9 @@ class ThroughFlowConfig extends TaintTracking::Configuration {
) )
} }
override predicate isSanitizer(DataFlow::Node n) { not isRelevantType(n.getType()) } override predicate isSanitizer(DataFlow::Node n) {
exists(Type t | t = n.getType() and not isRelevantType(t))
}
override DataFlow::FlowFeature getAFeature() { override DataFlow::FlowFeature getAFeature() {
result instanceof DataFlow::FeatureEqualSourceSinkCallContext result instanceof DataFlow::FeatureEqualSourceSinkCallContext

View File

@@ -21,7 +21,6 @@
| p;Joiner;false;merge;(Joiner);;Argument[-1];ReturnValue;value | | p;Joiner;false;merge;(Joiner);;Argument[-1];ReturnValue;value |
| p;Joiner;false;setEmptyValue;(CharSequence);;Argument[-1];ReturnValue;value | | p;Joiner;false;setEmptyValue;(CharSequence);;Argument[-1];ReturnValue;value |
| p;Joiner;false;setEmptyValue;(CharSequence);;Argument[0];Argument[-1];taint | | p;Joiner;false;setEmptyValue;(CharSequence);;Argument[0];Argument[-1];taint |
| p;Joiner;false;setEmptyValue;(CharSequence);;Argument[0];ReturnValue;taint |
| p;Joiner;false;toString;();;Argument[-1];ReturnValue;taint | | p;Joiner;false;toString;();;Argument[-1];ReturnValue;taint |
| p;MultipleImpls$Strat2;true;getValue;();;Argument[-1];ReturnValue;taint | | p;MultipleImpls$Strat2;true;getValue;();;Argument[-1];ReturnValue;taint |
| p;MultipleImpls$Strategy;true;doSomething;(String);;Argument[0];Argument[-1];taint | | p;MultipleImpls$Strategy;true;doSomething;(String);;Argument[0];Argument[-1];taint |