Skip to content

Commit

Permalink
Adding section to sync snyk
Browse files Browse the repository at this point in the history
  • Loading branch information
mv-arctiq committed Dec 14, 2023
1 parent 809446e commit fa479b7
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/pr_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ jobs:
- name: Authenticate with Snyk
run: snyk auth ${{ secrets.SNYK_TOKEN }}

# - name: Fetch ignored issues from snyk project
# run: |
# # Fetch current project ID here
# # Hardcoded for demo POC purposes
# PROJECT_ID="491d9894-c158-4a71-8a53-7b1101c1f535"

# set +x
# curl https://api.snyk.io/v1/org/arctiq-nfr-shared/project/${PROJECT_ID}/ignores \
# -H "Accept: application/json" \
# -H "Authorization: token ${{ secrets.SNYK_TOKEN }}" >ignores.json
# set -x
# IGNORES=$(jq 'to_entries[] | .key' ignores.json)

# rm -rf .snyk

# for ISSUE in $IGNORES; do
# ID=$(echo "$ISSUE" | tr -d '"')
# snyk ignore --id=$ID --expiry=2023-09-28T14:46:49.015Z --reason="We will fix this some day..."
# done
- name: Fetch ignored issues from snyk project
run: |
# Fetch current project ID here
# Hardcoded for demo POC purposes
PROJECT_ID="491d9894-c158-4a71-8a53-7b1101c1f535"
set +x
curl https://api.snyk.io/v1/org/arctiq-nfr-shared/project/${PROJECT_ID}/ignores \
-H "Accept: application/json" \
-H "Authorization: token ${{ secrets.SNYK_TOKEN }}" >ignores.json
set -x
IGNORES=$(jq 'to_entries[] | .key' ignores.json)
rm -rf .snyk
for ISSUE in $IGNORES; do
ID=$(echo "$ISSUE" | tr -d '"')
snyk ignore --id=$ID --expiry=2023-09-28T14:46:49.015Z --reason="We will fix this some day..."
done
- name: Run Snyk scan
id: snyk-scan
Expand Down

0 comments on commit fa479b7

Please sign in to comment.