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)
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user