Skip to content

Commit 35e82dc

Browse files
committed
Python revert .getNode() to .getSink()/.getSource() to keep expected test output the same.
1 parent f8c43ca commit 35e82dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/ql/src/Security/CWE-089/SqlInjection.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ class SQLInjectionConfiguration extends TaintTracking::Configuration {
2626

2727
SQLInjectionConfiguration() { this = "SQL injection configuration" }
2828

29-
override predicate isSource(TaintTracking::Source source) { source.isSourceOf(any(UntrustedStringKind u)) }
29+
override predicate isSource(TaintTracking::Source source) { source instanceof HttpRequestTaintSource }
3030

3131
override predicate isSink(TaintTracking::Sink sink) { sink instanceof SqlInjectionSink }
3232

3333
}
3434

3535
from SQLInjectionConfiguration config, TaintedPathSource src, TaintedPathSink sink
3636
where config.hasFlowPath(src, sink)
37-
select sink.getNode(), src, sink, "This SQL query depends on $@.", src.getNode(), "a user-provided value"
37+
select sink.getSink(), src, sink, "This SQL query depends on $@.", src.getSource(), "a user-provided value"

0 commit comments

Comments
 (0)