Skip to content

Commit a4e913c

Browse files
authored
Add Snyk workflow to GH actions
1 parent d69f9e0 commit a4e913c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/snyk.yml

+40
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+
schedule:
14+
- cron: '30 0 1,15 * *'
15+
16+
permissions:
17+
contents: read
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
21+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
22+
23+
jobs:
24+
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)