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 Details

  • Method Details

    • remediateAll

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