Last active
July 31, 2020 08:54
-
-
Save rohitnss/6d3965059f75095e59f7719322a0fd7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules: | |
- id: sql.injection | |
message: | | |
SQL Injection. | |
metadata: | |
owasp: "A1: Injection" | |
severity: ERROR | |
patterns: | |
- pattern-either: | |
- pattern: | #executeQuery | |
$RETURN $METHOD(...,String $VAR, ...) { | |
... | |
$SQL = $X + $VAR + $Y; | |
... | |
$W.executeQuery($SQL, ...); | |
... | |
} | |
- pattern: | #execute | |
$RETURN $METHOD(...,String $VAR, ...) { | |
... | |
$SQL = $X + $VAR + $Y; | |
... | |
$W.execute($SQL, ...); | |
... | |
} | |
- pattern: | #prepareStatement | |
$RETURN $METHOD(...,String $VAR, ...) { | |
... | |
$SQL = $X + $VAR + $Y; | |
... | |
$W.prepareStatement($SQL, ...); | |
... | |
} | |
languages: | |
- java |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment