mirror of
https://github.com/hohn/codeql-dataflow-sql-injection.git
synced 2025-12-16 10:13:04 +01:00
Summary: sql injection: sink identification
This commit is contained in:
committed by
=Michael Hohn
parent
c91db6a653
commit
1f385ddfe3
@@ -30,10 +30,10 @@ class SqliFlowConfig extends TaintTracking::Configuration {
|
|||||||
// where conf.hasFlowPath(source, sink)
|
// where conf.hasFlowPath(source, sink)
|
||||||
// select sink, source, sink, "Possible SQL injection"
|
// select sink, source, sink, "Possible SQL injection"
|
||||||
|
|
||||||
|
// Sink identification
|
||||||
// Source identification
|
// rc = sqlite3_exec(db, query, NULL, 0, &zErrMsg);
|
||||||
// count = read(STDIN_FILENO, buf, BUFSIZE);
|
from FunctionCall exec, DataFlow::Node sink
|
||||||
from FunctionCall read, DataFlow::Node source
|
where
|
||||||
where read.getTarget().getName() = "read"
|
exec.getTarget().getName() = "sqlite3_exec" and
|
||||||
and read.getArgument(1) = source.asExpr()
|
exec.getArgument(1) = sink.asExpr()
|
||||||
select read, source
|
select exec, sink
|
||||||
|
|||||||
Reference in New Issue
Block a user