Skip to content

Commit be9794b

Browse files
committed
add snyk scan workflow
1 parent dd69dcb commit be9794b

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/snyk.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Snyk Scan
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
schedule:
7+
- cron: '0 5 * * *' # Run at midnight Eastern Time every day (midnight EST/1 AM EDT)
8+
workflow_dispatch: # Allow manual triggering
9+
10+
jobs:
11+
snyk:
12+
name: Snyk Scan
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout source
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version-file: 'package.json'
23+
cache: 'npm'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Install Snyk CLI
29+
run: npm install -g snyk
30+
31+
- name: Authenticate Snyk
32+
run: snyk auth ${{ secrets.SNYK_TOKEN }}
33+
34+
- name: Run Snyk test for vulnerabilities
35+
run: snyk test --severity-threshold=high
36+
continue-on-error: true

0 commit comments

Comments
 (0)