mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
Fix bug in sink detection
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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; |
|
||||
|
||||
Reference in New Issue
Block a user