Files
codeql/python/ql/test/library-tests/taint/invalid/NoSink.ql
2018-11-19 15:15:54 +00:00

26 lines
490 B
Plaintext

import python
import semmle.python.security.TaintTracking
/* Sources */
class AnySource extends TaintSource {
AnySource() {
this instanceof ControlFlowNode
}
override predicate isSourceOf(TaintKind kind) { any() }
}
/* Flow */
import semmle.python.security.strings.Untrusted
from TaintSource src, TaintSink sink
where src.flowsToSink(sink)
select sink.toString(), "This message wouldn't appear if the query were complete $@",
src.toString(), "nor this"