Skip to content

Commit

Permalink
Refactor Snyk action config
Browse files Browse the repository at this point in the history
  • Loading branch information
pvannierop committed Oct 11, 2024
1 parent 5d71c4b commit 076c0c9
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,19 @@ on:
jobs:
security:
runs-on: ubuntu-latest

env:
SNYK_PARAMS: --all-projects --configuration-matching="^runtimeClasspath$" --fail-on=upgradable --org=radar-base --policy-path=.snyk --severity-threshold=high
steps:
- uses: actions/checkout@v3
- uses: snyk/actions/setup@master
with:
snyk-version: v1.1032.0

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run Snyk to check for JDK vulnerabilities
uses: snyk/actions/gradle-jdk17@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with: ${{ env.SNYK_PARAMS }}

- name: Run Snyk to check for vulnerabilities
- name: Run Snyk to check for Node vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: >
snyk test
--all-projects
--configuration-matching="^runtimeClasspath$"
--fail-on=upgradable
--org=radar-base
--policy-path=.snyk
--severity-threshold=high
with: ${{ env.SNYK_PARAMS }}

0 comments on commit 076c0c9

Please sign in to comment.