Skip to content

Commit 09a4676

Browse files
authored
Fix missing report error in Snyk scan workflow (#170)
1 parent 44ca176 commit 09a4676

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/snyk-scan.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ jobs:
2424
with:
2525
args: --all-projects --sarif-file-output=snyk.sarif
2626

27-
- name: Replace "security-severity" "undefined" for license-related findings
28-
run: |
29-
sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif
30-
3127
- name: Check output file
3228
id: out-file
3329
run: |
@@ -36,6 +32,11 @@ jobs:
3632
echo "::set-output name=exists::false"
3733
fi
3834
35+
- name: Handle undefined security-severity
36+
if: steps.out-file.outputs.exists == 'true'
37+
run: |
38+
sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif
39+
3940
- name: Upload result to GitHub Code Scanning
4041
if: steps.out-file.outputs.exists == 'true'
4142
uses: github/codeql-action/upload-sarif@v3

0 commit comments

Comments
 (0)