Skip to content

Commit c06de02

Browse files
authored
Create SqlInjectionAudit.ql
1 parent 40f8159 commit c06de02

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* @name Audit: Database query built from user-controlled sources
3+
* @description A SQL Injection sink is being used in your application, this can lead to remote code execution if user controled input comes into the sink
4+
* @kind problem
5+
* @problem.severity error
6+
* @security-severity 3.0
7+
* @id githubsecuritylab/audit/sql-injection
8+
* @tags security
9+
* external/cwe/cwe-089
10+
* external/cwe/cwe-090
11+
* external/cwe/cwe-943
12+
* audit
13+
*/
14+
15+
import javascript
16+
import semmle.javascript.security.dataflow.SqlInjectionQuery as SqlInjection
17+
import semmle.javascript.security.dataflow.NosqlInjectionQuery as NosqlInjection
18+
19+
from DataFlow::Node sink
20+
where sink instanceof SqlInjection::Sink
21+
select sink, "Command Injection sink"

0 commit comments

Comments
 (0)