mirror of
https://github.com/hohn/codeql-dataflow-sql-injection.git
synced 2025-12-16 10:13:04 +01:00
sql injection: taintstep across snprintf -- function not found
This commit is contained in:
committed by
=Michael Hohn
parent
aa5d019740
commit
45a5e89366
@@ -34,6 +34,11 @@ class SqliFlowConfig extends TaintTracking::Configuration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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"
|
||||||
|
|
||||||
|
// Extra taint step
|
||||||
|
// snprintf(query, bufsize, "INSERT INTO users VALUES (%d, '%s')", id, info);
|
||||||
|
from FunctionCall printf, DataFlow::Node into, DataFlow::Node out
|
||||||
|
where printf.getTarget().getName() = "snprintf"
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
"folders": [
|
"folders": [
|
||||||
{
|
{
|
||||||
"path": "."
|
"path": "."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "[codeql-dataflow-sql-injection-d5b28fb source archive]",
|
||||||
|
"uri": "codeql-zip-archive://0-66/Users/hohn/local/db/codeql-dataflow-sql-injection-d5b28fb/src.zip/"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user