Package io.codemodder.codemods
Class ValidateJakartaForwardPathCodemod
java.lang.Object
io.codemodder.javaparser.JavaParserChanger
io.codemodder.SarifPluginJavaParserChanger<com.github.javaparser.ast.expr.Expression>
io.codemodder.codemods.ValidateJakartaForwardPathCodemod
- All Implemented Interfaces:
io.codemodder.CodeChanger
@Codemod(id="pixee:java/validate-jakarta-forward-path",
importance=HIGH,
reviewGuidance=MERGE_WITHOUT_REVIEW)
public final class ValidateJakartaForwardPathCodemod
extends io.codemodder.SarifPluginJavaParserChanger<com.github.javaparser.ast.expr.Expression>
Makes sure that internal Jakarta forwards don't go to places they shouldn't (e.g.,
/WEB-INF/web.xml.)
-
Field Summary
Fields inherited from class io.codemodder.SarifPluginJavaParserChanger
sarif
Fields inherited from class io.codemodder.javaparser.JavaParserChanger
reporter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.codemodder.javaparser.ChangesResult
onResultFound
(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, com.github.javaparser.ast.expr.Expression path, com.contrastsecurity.sarif.Result result) Methods inherited from class io.codemodder.SarifPluginJavaParserChanger
shouldRun, visit
Methods inherited from class io.codemodder.javaparser.JavaParserChanger
getDescription, getIndividualChangeDescription, getReferences, getSummary
-
Constructor Details
-
ValidateJakartaForwardPathCodemod
@Inject public ValidateJakartaForwardPathCodemod(@SemgrepScan(ruleId="validate-jakarta-forward-path") io.codemodder.RuleSarif sarif)
-
-
Method Details
-
onResultFound
public io.codemodder.javaparser.ChangesResult onResultFound(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, com.github.javaparser.ast.expr.Expression path, com.contrastsecurity.sarif.Result result) - Specified by:
onResultFound
in classio.codemodder.SarifPluginJavaParserChanger<com.github.javaparser.ast.expr.Expression>
-