Package io.codemodder.codemods
Class HardenXMLInputFactoryCodemod
java.lang.Object
io.codemodder.javaparser.JavaParserChanger
io.codemodder.SarifPluginJavaParserChanger<com.github.javaparser.ast.body.VariableDeclarator>
io.codemodder.codemods.HardenXMLInputFactoryCodemod
- All Implemented Interfaces:
io.codemodder.CodeChanger
@Codemod(id="pixee:java/harden-xmlinputfactory",
reviewGuidance=MERGE_WITHOUT_REVIEW)
public final class HardenXMLInputFactoryCodemod
extends io.codemodder.SarifPluginJavaParserChanger<com.github.javaparser.ast.body.VariableDeclarator>
Disables external entity resolution in
XMLInputFactory
use.-
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 TypeMethodDescriptionList<io.codemodder.DependencyGAV>
boolean
onResultFound
(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, com.github.javaparser.ast.body.VariableDeclarator newFactoryVariable, com.contrastsecurity.sarif.Result result) Methods inherited from class io.codemodder.SarifPluginJavaParserChanger
visit
Methods inherited from class io.codemodder.javaparser.JavaParserChanger
getDescription, getIndividualChangeDescription, getReferences, getSourceControlUrl, getSummary
-
Constructor Details
-
HardenXMLInputFactoryCodemod
@Inject public HardenXMLInputFactoryCodemod(@SemgrepScan(ruleId="harden-xmlinputfactory") io.codemodder.RuleSarif sarif)
-
-
Method Details
-
onResultFound
public boolean onResultFound(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, com.github.javaparser.ast.body.VariableDeclarator newFactoryVariable, com.contrastsecurity.sarif.Result result) - Specified by:
onResultFound
in classio.codemodder.SarifPluginJavaParserChanger<com.github.javaparser.ast.body.VariableDeclarator>
-
dependenciesRequired
- Overrides:
dependenciesRequired
in classio.codemodder.javaparser.JavaParserChanger
-