Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.29 KB

README.md

File metadata and controls

35 lines (25 loc) · 1.29 KB

Add ignore data to Snyk ignore report

This script will read in an ignore csv from Snyk reporting dashboard. First you'll need to go to the group or organization reporting page. Select the Issue Status dropdown menu and then select Ignored. Next select Download CSV and set the CSV_PATH environment to the full path of it.

Requirements

Python version 3.9.5, 3.10.0

Environment Variables

Required Environment Variables:

SNYK_TOKEN

CSV_PATH (Specify full path to csv file)

Optional Environment Variables:

SNYK_API_URL

Example run via cli

export SNYK_TOKEN=TYPE-SNYK-TOKEN-HERE
export CSV_PATH=FULL-PATH-TO-CSV
export SNYK_API_URL="https://api.snyk.io"
git clone https://github.com/snyk-labs/add-ignore-reason-to-csv-report.git
pip install -r requirements.txt
python3 index.py

Example run with docker

docker build -t ignore-data-to-csv .
docker run -e SNYK_TOKEN=$SNYK_TOKEN -e CSV_PATH=/app/exampledata.csv -v $PWD/exampledata.csv:/app/exampledata.csv --name ignore-data-to-csv ignore-data-to-csv
docker cp ignore-csv:/usr/src/app/ignore_reason_report.csv $PWD/ignore_reason_report.csv