Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b2ac82

Browse files
author
Benjamin Muskalla
committed
Fix bug in sink detection
1 parent c616eb1 commit 2b2ac82

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

java/ql/src/utils/model-generator/CaptureSinkModels.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class PropagateToSinkConfiguration extends TaintTracking::Configuration {
2828
string asInputArgument(Expr source) {
2929
result = "Argument[" + source.(Argument).getPosition() + "]"
3030
or
31-
result = source.(VarAccess).getVariable().toString()
31+
result = "Argument[" + source.(VarAccess).getVariable().(Parameter).getPosition() + "]"
3232
}
3333

3434
string captureSink(Callable api) {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
| p;Sinks;true;copyFileToDirectory;(Path,Path,CopyOption[]);;Argument[1];create-file; |
2-
| p;Sinks;true;readUrl;(URL,Charset);;url;open-url; |
3-
| p;Sources;true;readUrl;(URL);;url;open-url; |
2+
| p;Sinks;true;readUrl;(URL,Charset);;Argument[0];open-url; |
3+
| p;Sources;true;readUrl;(URL);;Argument[0];open-url; |

0 commit comments

Comments
 (0)