io.codemodder.providers.sarif.semgrep.SemgrepRunner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codemodder-plugin-semgrep Show documentation
Show all versions of codemodder-plugin-semgrep Show documentation
Plugin to enable the use of semgrep in codemods
package io.codemodder.providers.sarif.semgrep;
import com.contrastsecurity.sarif.SarifSchema210;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
/** Responsible for running semgrep */
public interface SemgrepRunner {
/**
* Execute semgrep.
*
* @param yamls the file(s) where the rule(s) are stored
* @param codeDir the directory containing the code to be run on
* @return the resulting SARIF
*/
SarifSchema210 run(
List yamls, Path codeDir, List includePatterns, List excludePatterns)
throws IOException;
static SemgrepRunner createDefault() {
return new DefaultSemgrepRunner();
}
}