Skip to content

faros-ai/faros-scan-results-reporter

Repository files navigation

Scan Results Reporter

CLI for parsing & uploading code scan results (semgrep etc.) to Faros AI API

Usage

$ npm i

# Use --help to view all available configuration options
$ ./bin/faros-scan-result-reporter --help

# Run directly
$ ./bin/faros-scan-result-reporter /path/to/results.* \
  -k $FAROS_API_KEY \
  --tool semgrep \
  --repository '<repository>' \
  --organization '<organization>' \
  --source '<source>'

$ ./bin/faros-scan-result-reporter /path/to/results.* \
  -k $FAROS_API_KEY \
  --tool codeclimate \
  --repository '<repository>' \
  --organization '<organization>' \
  --source '<source>' \
  --pull-request 123

Or with Docker:

# Run with docker (make sure to set /path/to/results)

# Example 1: Input file names are known

$ docker run -v "/path/to/results:/results" \
  farosai/faros-scan-results-reporter:latest \
  /results/example1.json /results/example2.json \
  -k $FAROS_API_KEY \
  --tool semgrep \
  --repository '<repository>' \
  --organization '<organization>' \
  --source '<source>'

# Example 2: You want to use a wildcard to match multiple files

# Since wildcard expansion will not work as part of the `docker run` command, you can
# perform the expansion on the host:

$ docker run -v "/path/to/results:/results" \
  farosai/faros-scan-results-reporter:latest \
  $(for file in /path/to/results/*; do echo -n "/results/$(basename "$file") "; done) \
  -k $FAROS_API_KEY \
  --tool semgrep \
  --repository '<repository>' \
  --organization '<organization>' \
  --source '<source>'

About

CLI for parsing & uploading code scanning results (SemGrep, CodeClimate etc.) to Faros AI

Resources

License

Stars

Watchers

Forks

Packages

No packages published