Class StackTraceExposureCodemod

java.lang.Object
io.codemodder.javaparser.JavaParserChanger
io.codemodder.SarifPluginJavaParserChanger<T>
io.codemodder.providers.sarif.codeql.CodeQLSarifJavaParserChanger<com.github.javaparser.ast.expr.Expression>
io.codemodder.codemods.StackTraceExposureCodemod
All Implemented Interfaces:
io.codemodder.CodeChanger, io.codemodder.FixOnlyCodeChanger

@Codemod(id="codeql:java/error-message-exposure", reviewGuidance=MERGE_WITHOUT_REVIEW, importance=MEDIUM, executionPriority=HIGH) public final class StackTraceExposureCodemod extends io.codemodder.providers.sarif.codeql.CodeQLSarifJavaParserChanger<com.github.javaparser.ast.expr.Expression>
Fixes issues reported under the id "java/java-error-message-exposure" (used to be java-stack-trace-exposure).
  • Field Summary

    Fields inherited from class io.codemodder.SarifPluginJavaParserChanger

    sarif

    Fields inherited from class io.codemodder.javaparser.JavaParserChanger

    reporter
  • Constructor Summary

    Constructors
    Constructor
    Description
    StackTraceExposureCodemod(io.codemodder.RuleSarif sarif)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.codemodder.codetf.DetectorRule
     
    io.codemodder.javaparser.ChangesResult
    onResultFound(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, com.github.javaparser.ast.expr.Expression expression, com.contrastsecurity.sarif.Result result)
     

    Methods inherited from class io.codemodder.providers.sarif.codeql.CodeQLSarifJavaParserChanger

    vendorName

    Methods inherited from class io.codemodder.SarifPluginJavaParserChanger

    shouldRun, visit

    Methods inherited from class io.codemodder.javaparser.JavaParserChanger

    getDescription, getIndividualChangeDescription, getReferences, getSummary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StackTraceExposureCodemod

      @Inject public StackTraceExposureCodemod(@ProvidedCodeQLScan(ruleId="java/error-message-exposure") 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 expression, com.contrastsecurity.sarif.Result result)
      Specified by:
      onResultFound in class io.codemodder.SarifPluginJavaParserChanger<com.github.javaparser.ast.expr.Expression>
    • detectorRule

      public io.codemodder.codetf.DetectorRule detectorRule()