Skip to content

Commit 3352342

Browse files
Add Snyk workflow for vulnerability checks (#6)
1 parent b58ab21 commit 3352342

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/snyk.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Snyk
2+
3+
on:
4+
merge_group:
5+
workflow_dispatch:
6+
pull_request:
7+
types:
8+
- opened
9+
- synchronize
10+
push:
11+
branches:
12+
- main
13+
- beta
14+
schedule:
15+
- cron: '30 0 1,15 * *'
16+
17+
permissions:
18+
contents: read
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
22+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
23+
24+
jobs:
25+
check:
26+
27+
name: Check for Vulnerabilities
28+
runs-on: ubuntu-latest
29+
30+
steps:
31+
- if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group'
32+
run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
33+
34+
- uses: actions/checkout@v4
35+
with:
36+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
37+
38+
- uses: snyk/actions/node@b98d498629f1c368650224d6d212bf7dfa89e4bf # [email protected]
39+
env:
40+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

0 commit comments

Comments
 (0)