Created
October 18, 2021 08:24
-
-
Save inkz/14827f602ba896d0661a40a07ffaa1e8 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: java-spring-sink-source | |
mode: taint | |
pattern-sinks: | |
- pattern: | | |
$SINK(...) | |
pattern-sources: | |
- patterns: | |
- pattern: $VAR | |
- pattern-either: | |
- pattern-inside: | | |
$TYPE $FUNC(..., @RequestParam(...) $T $VAR, ...) { | |
... | |
} | |
- pattern-inside: | | |
$TYPE $FUNC(..., @RequestHeader(...) $T $VAR, ...) { | |
... | |
} | |
- pattern-inside: | | |
$TYPE $FUNC(..., @CookieValue(...) $T $VAR, ...) { | |
... | |
} | |
- pattern-inside: | | |
$TYPE $FUNC(..., @RequestAttribute(...) $T $VAR, ...) { | |
... | |
} | |
- pattern-inside: | | |
$TYPE $FUNC(..., @RequestBody(...) $T $VAR, ...) { | |
... | |
} | |
message: | | |
sink found | |
languages: [java] | |
severity: ERROR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment