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",
importance=HIGH,
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 Stringprotected StringgetThreatPrompt(io.codemodder.CodemodInvocationContext context, List<com.contrastsecurity.sarif.Result> results) protected booleanisPatchExpected(com.github.difflib.patch.Patch<String> patch) Methods inherited from class io.codemodder.plugins.llm.SarifToLLMForBinaryVerificationAndFixingCodemod
onFileFoundMethods inherited from class io.codemodder.SarifPluginRawFileChanger
visitFileMethods inherited from class io.codemodder.RawFileChanger
getDescription, getIndividualChangeDescription, getReferences, getSummaryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getThreatPromptin classio.codemodder.plugins.llm.SarifToLLMForBinaryVerificationAndFixingCodemod
-
getFixPrompt
- Specified by:
getFixPromptin classio.codemodder.plugins.llm.SarifToLLMForBinaryVerificationAndFixingCodemod
-
isPatchExpected
- Specified by:
isPatchExpectedin classio.codemodder.plugins.llm.SarifToLLMForBinaryVerificationAndFixingCodemod
-