-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from RADAR-base/feature/add-snyk
Feature/add snyk
- Loading branch information
Showing
3 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
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/setup@master | ||
with: | ||
snyk-version: v1.1032.0 | ||
|
||
- name: Use Node.js 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Run Snyk | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
run: > | ||
snyk test | ||
--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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Snyk test | ||
on: | ||
pull_request: | ||
branches: [ master, dev ] | ||
jobs: | ||
security: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: snyk/actions/setup@master | ||
with: | ||
snyk-version: v1.1032.0 | ||
|
||
- name: Use Node.js 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- 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 vulnerabilities | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
run: > | ||
snyk test | ||
--all-projects | ||
--configuration-matching='^runtimeClasspath$' | ||
--org=radar-base | ||
--policy-path=$PWD/.snyk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: {} |