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.
Python version 3.9.5, 3.10.0
Required Environment Variables:
CSV_PATH (Specify full path to csv file)
Optional Environment Variables:
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
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