io.codemodder.codemods.harden-zip-entry-paths.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: harden-zip-entry-paths
patterns:
- pattern: $ZIS = new ZipInputStream(...)
- pattern-not-inside: |
$RT $METHOD ($ARGS) {
...
ZipSecurity.createHardenedInputStream($ZIS, ...);
...
}
- pattern-not-inside: >
$RT $METHOD ($ARGS) {
...
io.github.pixee.security.ZipSecurity.createHardenedInputStream($ZIS, ...);
...
}
message: Semgrep found a match
languages:
- java
severity: WARNING