Skip to content

Commit 0371d5d

Browse files
authored
SEC-507 MAINT: Updating Snyk actions (#631)
1 parent 3626f7c commit 0371d5d

File tree

2 files changed

+25
-37
lines changed

2 files changed

+25
-37
lines changed

.github/workflows/snyk_sca_scan.yaml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
name: Snyk Software Composition Analysis Scan
2-
# This git workflow leverages Snyk actions to perform a Software Composition
3-
# Analysis scan on our Opensource libraries upon Pull Requests to Master &
4-
# Develop branches. We use this as a control to prevent vulnerable packages
5-
# from being introduced into the codebase.
62
on:
7-
pull_request_target:
8-
types:
9-
- opened
10-
branches:
3+
push:
4+
branches:
5+
- '*'
6+
pull_request:
7+
branches:
118
- master
129
- develop
1310
jobs:
@@ -17,17 +14,15 @@ jobs:
1714
matrix:
1815
node-version: [16.x]
1916
steps:
20-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
2118
- name: Setting up Node
22-
uses: actions/setup-node@v1
19+
#- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v3
2321
with:
2422
node-version: ${{ matrix.node-version }}
25-
- name: Installing snyk-delta and dependencies
26-
run: npm i -g snyk-delta
27-
- uses: snyk/actions/setup@master
28-
- name: Perform SCA Scan
29-
continue-on-error: false
30-
run: |
31-
snyk test --all-projects --detection-depth=4 --exclude=docker,Dockerfile --severity-threshold=critical
23+
- name: Run Snyk to check for opensource vulnerabilities
24+
uses: snyk/actions/node@master
3225
env:
33-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
26+
SNYK_TOKEN: ${{ secrets.SNYK_API_TOKEN }}
27+
with:
28+
args: --debug --strict-out-of-sync=false --detection-depth=6 --exclude=docker,Dockerfile --severity-threshold=critical
Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
11
name: Snyk Static Analysis Scan
2-
# This git workflow leverages Snyk actions to perform a Static Application
3-
# Testing scan (SAST) on our first-party code upon Pull Requests to Master &
4-
# Develop branches. We use this as a control to prevent vulnerabilities
5-
# from being introduced into the codebase.
2+
# This SAST (Static Application Security Testing) scan is used to scan
3+
# our first-party code for security vulnerabilities
64
on:
7-
pull_request_target:
8-
types:
9-
- opened
10-
branches:
5+
push:
6+
branches:
7+
- '*'
8+
pull_request:
9+
branches:
1110
- master
1211
- develop
1312
jobs:
14-
Snyk_SAST_Scan :
13+
Snyk_SAST_Scan:
1514
runs-on: ubuntu-latest
1615
steps:
17-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1817
- uses: snyk/actions/setup@master
1918
- name: Perform Static Analysis Test
20-
continue-on-error: true
21-
run: |
22-
snyk code test --all-projects --detection-depth=4 --exclude=docker,Dockerfile --severity-threshold=high
2319
env:
24-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
25-
# The Following Requires Advanced Security License
26-
# - name: Upload results to Github Code Scanning
27-
# uses: github/codeql-action/upload-sarif@v1
28-
# with:
29-
# sarif_file: snyk_sarif
20+
SNYK_TOKEN: ${{ secrets.SNYK_API_TOKEN }}
21+
continue-on-error: true
22+
run: snyk code test --strict-out-of-sync=false --detection-depth=6 --exclude=docker,Dockerfile --severity-threshold=high

0 commit comments

Comments
 (0)