Skip to content

Commit

Permalink
Add Snyk GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pvannierop committed Oct 10, 2024
1 parent 1589292 commit b207985
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/scheduled-snyk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Snyk scheduled test
on:
schedule:
- cron: '0 2 1 * *'
push:
branches:
- master

jobs:
security:
runs-on: ubuntu-latest
env:
REPORT_FILE: test.json
steps:
- uses: actions/checkout@v3
- uses: snyk/actions/gradle-jdk17@master
name: Run Snyk to check for vulnerabilities
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with: --all-projects --configuration-matching='^runtimeClasspath$' --fail-on=upgradable --json-file-output=${{ env.REPORT_FILE }}--org=radar-base --policy-path=$PWD/.snyk

- name: Report new vulnerabilities
uses: thehyve/report-vulnerability@master
if: success() || failure()
with:
report-file: ${{ env.REPORT_FILE }}
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Snyk test
on:
pull_request:
branches: [ master, dev ]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: snyk/actions/gradle-jdk17@master
name: Run Snyk to check for vulnerabilities
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with: --all-projects --configuration-matching='^runtimeClasspath$' --org=radar-base --policy-path=$PWD/.snyk
5 changes: 5 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.25.0
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
patch: {}

0 comments on commit b207985

Please sign in to comment.