Package io.codemodder.codemods
Class SensitiveDataLoggingCodemod
java.lang.Object
io.codemodder.RawFileChanger
io.codemodder.SarifPluginRawFileChanger
io.codemodder.plugins.llm.SarifToLLMForBinaryVerificationAndFixingCodemod
io.codemodder.codemods.SensitiveDataLoggingCodemod
- All Implemented Interfaces:
io.codemodder.CodeChanger
@Codemod(id="pixee:java/sensitive-data-logging",
reviewGuidance=MERGE_AFTER_REVIEW)
public final class SensitiveDataLoggingCodemod
extends io.codemodder.plugins.llm.SarifToLLMForBinaryVerificationAndFixingCodemod
A codemod that removes any sensitive data being logged.
-
Field Summary
Fields inherited from class io.codemodder.RawFileChanger
reporter
-
Constructor Summary
ConstructorsConstructorDescriptionSensitiveDataLoggingCodemod
(io.codemodder.RuleSarif sarif, io.codemodder.plugins.llm.OpenAIService openAI) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected String
getThreatPrompt
(io.codemodder.CodemodInvocationContext context, List<com.contrastsecurity.sarif.Result> results) protected boolean
isPatchExpected
(com.github.difflib.patch.Patch<String> patch) Methods inherited from class io.codemodder.plugins.llm.SarifToLLMForBinaryVerificationAndFixingCodemod
onFileFound
Methods inherited from class io.codemodder.SarifPluginRawFileChanger
visitFile
Methods inherited from class io.codemodder.RawFileChanger
getDescription, getIndividualChangeDescription, getReferences, getSummary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.codemodder.CodeChanger
shouldRun
-
Constructor Details
-
SensitiveDataLoggingCodemod
@Inject public SensitiveDataLoggingCodemod(@SemgrepScan(ruleId="sensitive-data-logging") io.codemodder.RuleSarif sarif, io.codemodder.plugins.llm.OpenAIService openAI)
-
-
Method Details
-
getThreatPrompt
protected String getThreatPrompt(io.codemodder.CodemodInvocationContext context, List<com.contrastsecurity.sarif.Result> results) - Specified by:
getThreatPrompt
in classio.codemodder.plugins.llm.SarifToLLMForBinaryVerificationAndFixingCodemod
-
getFixPrompt
- Specified by:
getFixPrompt
in classio.codemodder.plugins.llm.SarifToLLMForBinaryVerificationAndFixingCodemod
-
isPatchExpected
- Specified by:
isPatchExpected
in classio.codemodder.plugins.llm.SarifToLLMForBinaryVerificationAndFixingCodemod
-