Skip to content

Instantly share code, notes, and snippets.

@rohitnss
Created July 29, 2020 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohitnss/0d086b4aadd8d1e2175d4e06e1d5174e to your computer and use it in GitHub Desktop.
Save rohitnss/0d086b4aadd8d1e2175d4e06e1d5174e to your computer and use it in GitHub Desktop.
rules:
- id: crypto
message: |
Insecure Cryptographic Functions being Used. Please investigate further
severity: ERROR
patterns:
- pattern-either:
- pattern: | #Identify any parameter value being equated to Strings using equals method
$RETURN $METHOD(...,String $VAR, ...) {
...
if(<... $VAR.equals("...") ...>)
...
}
- pattern: String secret = "..." ;
- pattern: String key = "..." ;
- pattern: String token = "..." ;
languages:
- java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment