Skip to content

Commit 85d6f6b

Browse files
author
Alvaro Muñoz
committed
Fix LogInjection query
1 parent 4108139 commit 85d6f6b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

go/src/security/CWE-117/LogInjection.ql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import go
1515
import semmle.go.security.LogInjection
16-
import DataFlow::PathGraph
16+
import LogInjection::Flow::PathGraph
1717

1818
class RegexpSanitizer extends LogInjection::Sanitizer {
1919
RegexpSanitizer() {
@@ -26,7 +26,7 @@ class RegexpSanitizer extends LogInjection::Sanitizer {
2626
}
2727
}
2828

29-
from LogInjection::Configuration c, DataFlow::PathNode source, DataFlow::PathNode sink
30-
where c.hasFlowPath(source, sink)
31-
select sink, source, sink, "This log write receives unsanitized user input from $@.",
32-
source.getNode(), "here"
29+
from LogInjection::Flow::PathNode source, LogInjection::Flow::PathNode sink
30+
where LogInjection::Flow::flowPath(source, sink)
31+
select sink.getNode(), source, sink, "This log entry depends on a $@.", source.getNode(),
32+
"user-provided value"

0 commit comments

Comments
 (0)