Skip to content

Commit

Permalink
Fix missing report error in Snyk scan workflow (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
reugn authored Nov 13, 2024
1 parent 44ca176 commit 09a4676
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/snyk-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ jobs:
with:
args: --all-projects --sarif-file-output=snyk.sarif

- name: Replace "security-severity" "undefined" for license-related findings
run: |
sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif
- name: Check output file
id: out-file
run: |
Expand All @@ -36,6 +32,11 @@ jobs:
echo "::set-output name=exists::false"
fi
- name: Handle undefined security-severity
if: steps.out-file.outputs.exists == 'true'
run: |
sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif
- name: Upload result to GitHub Code Scanning
if: steps.out-file.outputs.exists == 'true'
uses: github/codeql-action/upload-sarif@v3
Expand Down

0 comments on commit 09a4676

Please sign in to comment.