Skip to content

Commit b42fc31

Browse files
authored
Merge pull request #1262 from w3bdesign/develop
👷 ci: improve snyk security scan reliability
2 parents 3c0f68a + 2486f1d commit b42fc31

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/snyk-scan.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939

4040
- name: Run Snyk to check main project vulnerabilities
4141
uses: snyk/actions/node@master
42+
continue-on-error: true
4243
env:
4344
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
4445
with:
@@ -47,6 +48,7 @@ jobs:
4748

4849
- name: Run Snyk to check studio project vulnerabilities
4950
uses: snyk/actions/node@master
51+
continue-on-error: true
5052
env:
5153
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
5254
with:
@@ -55,28 +57,29 @@ jobs:
5557

5658
- name: Run Snyk to check eslint plugin vulnerabilities
5759
uses: snyk/actions/node@master
60+
continue-on-error: true
5861
env:
5962
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
6063
with:
6164
command: "test"
6265
args: "--file=src/utils/eslint/package.json --sarif-file-output=snyk-eslint.sarif --severity-threshold=high"
6366

6467
- name: Upload main project SARIF report to GitHub Security tab
65-
if: always()
68+
if: always() && hashFiles('snyk-main.sarif') != ''
6669
uses: github/codeql-action/upload-sarif@v4
6770
with:
6871
sarif_file: snyk-main.sarif
6972
category: snyk-main
7073

7174
- name: Upload studio SARIF report to GitHub Security tab
72-
if: always()
75+
if: always() && hashFiles('snyk-studio.sarif') != ''
7376
uses: github/codeql-action/upload-sarif@v4
7477
with:
7578
sarif_file: snyk-studio.sarif
7679
category: snyk-studio
7780

7881
- name: Upload eslint plugin SARIF report to GitHub Security tab
79-
if: always()
82+
if: always() && hashFiles('snyk-eslint.sarif') != ''
8083
uses: github/codeql-action/upload-sarif@v4
8184
with:
8285
sarif_file: snyk-eslint.sarif

0 commit comments

Comments
 (0)