io.codemodder.codemods.validate-jakarta-forward-path.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: validate-jakarta-forward-path
patterns:
- pattern: (HttpServletRequest $REQ).getRequestDispatcher($PATH)
- pattern-not: (HttpServletRequest $REQ).getRequestDispatcher("...")
- metavariable-regex:
metavariable: $PATH
regex: (?!(validate|sanitize|strip).*)
- focus-metavariable: $PATH
message: Semgrep found a match
languages:
- java
severity: WARNING