Summary: sql injection: sink identification

This commit is contained in:
Michael Hohn
2020-07-20 14:14:55 -07:00
committed by =Michael Hohn
parent c91db6a653
commit 1f385ddfe3

View File

@@ -30,10 +30,10 @@ class SqliFlowConfig extends TaintTracking::Configuration {
// where conf.hasFlowPath(source, sink)
// select sink, source, sink, "Possible SQL injection"
// Source identification
// count = read(STDIN_FILENO, buf, BUFSIZE);
from FunctionCall read, DataFlow::Node source
where read.getTarget().getName() = "read"
and read.getArgument(1) = source.asExpr()
select read, source
// Sink identification
// rc = sqlite3_exec(db, query, NULL, 0, &zErrMsg);
from FunctionCall exec, DataFlow::Node sink
where
exec.getTarget().getName() = "sqlite3_exec" and
exec.getArgument(1) = sink.asExpr()
select exec, sink