Fix bug in sink detection

This commit is contained in:
Benjamin Muskalla
2021-09-30 12:48:27 +02:00
parent c616eb1473
commit 2b2ac82fb7
2 changed files with 3 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ class PropagateToSinkConfiguration extends TaintTracking::Configuration {
string asInputArgument(Expr source) {
result = "Argument[" + source.(Argument).getPosition() + "]"
or
result = source.(VarAccess).getVariable().toString()
result = "Argument[" + source.(VarAccess).getVariable().(Parameter).getPosition() + "]"
}
string captureSink(Callable api) {

View File

@@ -1,3 +1,3 @@
| p;Sinks;true;copyFileToDirectory;(Path,Path,CopyOption[]);;Argument[1];create-file; |
| p;Sinks;true;readUrl;(URL,Charset);;url;open-url; |
| p;Sources;true;readUrl;(URL);;url;open-url; |
| p;Sinks;true;readUrl;(URL,Charset);;Argument[0];open-url; |
| p;Sources;true;readUrl;(URL);;Argument[0];open-url; |