-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add weekly Snyk Docker image scan to Github actions
- Loading branch information
1 parent
7ad34b4
commit da9c876
Showing
2 changed files
with
48 additions
and
10 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,44 @@ | ||
name: Snyk scheduled Docker image scan | ||
on: | ||
schedule: | ||
- cron: '0 3 * * 1' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
security: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Run Snyk to check for vulnerabilities on backend image | ||
uses: snyk/actions/docker@master | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
with: | ||
image: radarbase/radar-rest-source-auth-backend | ||
args: --file=authorizer-app-backend/Dockerfile --org=radar-base --fail-on=upgradable --severity-threshold=high --policy-path=$PWD/.snyk --json-file-output=backend.json | ||
|
||
- name: Run Snyk to check for vulnerabilities on frontend image | ||
uses: snyk/actions/docker@master | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
with: | ||
image: radarbase/radar-rest-source-authorizer | ||
args: --file=authorizer-app/Dockerfile --org=radar-base --fail-on=upgradable --severity-threshold=high --policy-path=$PWD/.snyk --json-file-output=frontend.json | ||
|
||
- name: Report new backend vulnerabilities | ||
uses: thehyve/report-vulnerability@master | ||
if: success() || failure() | ||
with: | ||
report-file: backend.json | ||
env: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Report new frontend vulnerabilities | ||
uses: thehyve/report-vulnerability@master | ||
if: success() || failure() | ||
with: | ||
report-file: frontend.json | ||
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