mirror of
https://github.com/hohn/codeql-dataflow-sql-injection.git
synced 2025-12-16 18:23:05 +01:00
sql injection: call to read
This commit is contained in:
committed by
=Michael Hohn
parent
47b1c9522c
commit
a69c511dc1
@@ -21,6 +21,13 @@ class SqliFlowConfig extends TaintTracking::Configuration {
|
|||||||
override predicate isSink(DataFlow::Node sink) { any() }
|
override predicate isSink(DataFlow::Node sink) { any() }
|
||||||
}
|
}
|
||||||
|
|
||||||
from SqliFlowConfig conf, DataFlow::PathNode source, DataFlow::PathNode sink
|
// from SqliFlowConfig conf, DataFlow::PathNode source, DataFlow::PathNode sink
|
||||||
where conf.hasFlowPath(source, sink)
|
// where conf.hasFlowPath(source, sink)
|
||||||
select sink, source, sink, "Possible SQL injection"
|
// select sink, source, sink, "Possible SQL injection"
|
||||||
|
|
||||||
|
|
||||||
|
// Source identification
|
||||||
|
// count = read(STDIN_FILENO, buf, BUFSIZE);
|
||||||
|
from FunctionCall read
|
||||||
|
where read.getTarget().getName() = "read"
|
||||||
|
select read
|
||||||
|
|||||||
Reference in New Issue
Block a user