io.codemodder.remediation.xss.XSSRemediator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codemodder-base Show documentation
Show all versions of codemodder-base Show documentation
Base framework for writing codemods in Java
package io.codemodder.remediation.xss;
import com.github.javaparser.ast.CompilationUnit;
import io.codemodder.CodemodFileScanningResult;
import io.codemodder.codetf.DetectorRule;
import java.nio.file.Path;
import java.util.List;
import java.util.function.Function;
/** Remediates header injection vulnerabilities. */
public interface XSSRemediator {
/** Remediate all header injection vulnerabilities in the given compilation unit. */
CodemodFileScanningResult remediateJava(
CompilationUnit cu,
String path,
DetectorRule detectorRule,
List issuesForFile,
Function getKey,
Function getLine,
Function getColumn);
CodemodFileScanningResult remediateJSP(
Path filePath,
String relativePath,
DetectorRule detectorRule,
List issuesForFile,
Function getKey,
Function getLine,
Function getColumn);
/** The default header injection remediation strategy. */
XSSRemediator DEFAULT = new DefaultXSSRemediator();
}