Skip to content

Commit 8aff7af

Browse files
authored
Add snyk workflow (#9)
Signed-off-by: Dmitry Sulman <[email protected]>
1 parent 6e12b4a commit 8aff7af

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Snyk Dependencies Check
2+
3+
on:
4+
push:
5+
branches: ["main" ]
6+
pull_request:
7+
branches: ["main"]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
snyk:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Snyk CLI to check for security issues
18+
# Snyk can be used to break the build when it detects security issues.
19+
# In this case we want to upload the SAST issues to GitHub Code Scanning
20+
uses: snyk/actions/setup@806182742461562b67788a64410098c9d9b96adb
21+
22+
- name: Set up JDK 17
23+
uses: actions/setup-java@v4
24+
with:
25+
java-version: '17'
26+
distribution: 'temurin'
27+
28+
- name: Setup Gradle
29+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
30+
31+
# Runs Snyk Code (SAST) analysis and uploads result into GitHub.
32+
# Use || true to not fail the pipeline
33+
- name: Snyk test
34+
run: snyk test --all-sub-projects --configuration-matching=^runtimeClasspath$ # || true
35+
env:
36+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

0 commit comments

Comments
 (0)