io.codemodder.codemods.upgrade-sslparameters-tls.yaml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core-codemods Show documentation
Show all versions of core-codemods Show documentation
Codemods for fixing common errors across many Java projects
The newest version!
rules:
- id: upgrade-sslparameters-tls
patterns:
- pattern: (SSLParameters $SSL).setProtocols($PROTOCOLS)
- metavariable-pattern:
metavariable: $PROTOCOLS
patterns:
- pattern-either:
- pattern: new String[]{"TLSv1"}
- pattern: new String[]{"TLSv1.1"}
- pattern: new String[]{"TLSv1","TLSv1.1"}
- pattern: new String[]{"TLSv1.1","TLSv1"}
- pattern-inside: |
class $CLASS {
...
String[] $PROTOCOLS = new String[]{"TLSv1"};
...
}
message: Semgrep found a match
languages:
- java
severity: WARNING