Class SensitiveDataLoggingCodemod

java.lang.Object
io.codemodder.RawFileChanger
io.codemodder.SarifPluginRawFileChanger
io.codemodder.plugins.llm.LLMAssistedCodemod
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.LLMAssistedCodemod
A codemod that removes any sensitive data being logged.
  • Field Summary

    Fields inherited from class io.codemodder.RawFileChanger

    reporter
  • Constructor Summary

    Constructors
    Constructor
    Description
    SensitiveDataLoggingCodemod(io.codemodder.RuleSarif sarif, io.codemodder.plugins.llm.OpenAIService openAI)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
     
    protected String
     
    protected boolean
    isPatchExpected(com.github.difflib.patch.Patch<String> patch)
     

    Methods inherited from class io.codemodder.plugins.llm.LLMAssistedCodemod

    getClassResourceAsString, onFileFound

    Methods inherited from class io.codemodder.SarifPluginRawFileChanger

    visitFile

    Methods inherited from class io.codemodder.RawFileChanger

    getDescription, getIndividualChangeDescription, getReferences, getSourceControlUrl, getSummary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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()
      Specified by:
      getThreatPrompt in class io.codemodder.plugins.llm.LLMAssistedCodemod
    • getFixPrompt

      protected String getFixPrompt()
      Specified by:
      getFixPrompt in class io.codemodder.plugins.llm.LLMAssistedCodemod
    • isPatchExpected

      protected boolean isPatchExpected(com.github.difflib.patch.Patch<String> patch)
      Specified by:
      isPatchExpected in class io.codemodder.plugins.llm.LLMAssistedCodemod