mirror of
https://github.com/github/codeql.git
synced 2026-06-18 03:11:07 +02:00
These are no longer correct, since the A1 category changed from 2017 to 2021, see https://owasp.org/Top10/#whats-changed-in-the-top-10-for-2021 Since only a very few queries had these tags, I think we're much better off having them removed.
22 lines
712 B
Plaintext
22 lines
712 B
Plaintext
/**
|
|
* @name SQL query built from user-controlled sources
|
|
* @description Building a SQL query from user-controlled sources is vulnerable to insertion of
|
|
* malicious SQL code by the user.
|
|
* @kind path-problem
|
|
* @problem.severity error
|
|
* @security-severity 8.8
|
|
* @precision high
|
|
* @id py/sql-injection
|
|
* @tags security
|
|
* external/cwe/cwe-089
|
|
*/
|
|
|
|
import python
|
|
import semmle.python.security.dataflow.SqlInjection
|
|
import DataFlow::PathGraph
|
|
|
|
from SqlInjection::Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink
|
|
where config.hasFlowPath(source, sink)
|
|
select sink.getNode(), source, sink, "This SQL query depends on $@.", source.getNode(),
|
|
"a user-provided value"
|