Skip to content

Commit efdaac2

Browse files
committed
Show the Snyk failure
This change will show the Snyk failure in the Github Actions workflow otherwise it is obscured and shows that everything passed (which is incorrect)
1 parent e494d3c commit efdaac2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ jobs:
103103
run: npm install -g snyk
104104

105105
- name: Run Snyk to check for vulnerabilities
106+
id: snyk
106107
continue-on-error: true
107108
env:
108109
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
@@ -111,4 +112,10 @@ jobs:
111112
- name: Upload result to GitHub Code Scanning
112113
uses: github/codeql-action/upload-sarif@v3
113114
with:
114-
sarif_file: snyk.sarif
115+
sarif_file: snyk.sarif
116+
117+
- name: Check Snyk scan status
118+
if: steps.snyk.outcome == 'failure'
119+
run: |
120+
echo "Security vulnerabilities found"
121+
exit 1

0 commit comments

Comments
 (0)