Interface JavaParserSQLInjectionRemediatorStrategy


public interface JavaParserSQLInjectionRemediatorStrategy
Strategy interface for remediating SQL injection vulnerabilities using JavaParser. Implementations of this interface define the method to visit a CompilationUnit and process findings for potential SQL injections.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> io.codemodder.CodemodFileScanningResult
    visit(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, Collection<T> pathFindings, io.codemodder.codetf.DetectorRule detectorRule, Function<T,String> findingIdExtractor, Function<T,Integer> findingLineExtractor)
    Visits the provided CompilationUnit and processes findings for potential SQL injections.
  • Field Details

  • Method Details

    • visit

      <T> io.codemodder.CodemodFileScanningResult visit(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, Collection<T> pathFindings, io.codemodder.codetf.DetectorRule detectorRule, Function<T,String> findingIdExtractor, Function<T,Integer> findingLineExtractor)
      Visits the provided CompilationUnit and processes findings for potential SQL injections.
      Type Parameters:
      T - the type of the findings
      Parameters:
      context - the context of the codemod invocation
      cu - the compilation unit to be scanned
      pathFindings - a collection of findings to be processed
      detectorRule - the rule used to detect potential issues
      findingIdExtractor - a function to extract the ID from a finding
      findingLineExtractor - a function to extract the line number from a finding
      Returns:
      a result object containing the changes and unfixed findings