All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.codemodder.providers.sarif.semgrep.SemgrepProvider Maven / Gradle / Ivy

There is a newer version: 0.97.8
Show newest version
package io.codemodder.providers.sarif.semgrep;

import com.google.inject.AbstractModule;
import io.codemodder.CodeChanger;
import io.codemodder.CodemodProvider;
import io.codemodder.RuleSarif;
import java.nio.file.Path;
import java.util.List;
import java.util.Set;

/** Provides Semgrep-related functionality to codemodder. */
public final class SemgrepProvider implements CodemodProvider {

  @Override
  public Set getModules(
      final Path codeDirectory,
      final List includedFiles,
      final List includePaths,
      final List excludePaths,
      final List> codemodTypes,
      final List sarifs,
      final List sonarIssuesJsonPaths,
      final List sonarHotspotsJsonPaths,
      final Path defectDojoFindingsJsonFile,
      final Path contrastFindingsJsonPath) {
    return Set.of(
        new SemgrepModule(
            codeDirectory,
            includePaths,
            excludePaths,
            codemodTypes,
            sarifs,
            new DefaultSemgrepRuleFactory()));
  }

  @Override
  public List wantsSarifToolNames() {
    return semgrepToolNames;
  }

  static final List semgrepToolNames = List.of("semgrep", "Semgrep", "Semgrep OSS");
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy