Skip to content

Commit 587dc2c

Browse files
author
Gonzalo Diaz
committed
[CONFIG] Github action: Snyk Container analysis added.
1 parent dbc6b7d commit 587dc2c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,20 @@ jobs:
2222
- name: Tag Docker image
2323
run: docker tag algorithm-exercises-js:latest algorithm-exercises-js:${{ github.sha }}
2424

25+
- name: Run Snyk to check Docker image for vulnerabilities
26+
# Snyk can be used to break the build when it detects vulnerabilities.
27+
# In this case we want to upload the issues to GitHub Code Scanning
28+
continue-on-error: true
29+
uses: snyk/actions/docker@master
30+
env:
31+
# In order to use the Snyk Action you will need to have a Snyk API token.
32+
# See https://docs.snyk.io/integrations/ci-cd-integrations/github-actions-integration#getting-your-snyk-token
33+
# or you can sign up for free at https://snyk.io/login
34+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
35+
with:
36+
image: algorithm-exercises-js:latest
37+
args: --file=Dockerfile
38+
# - name: Upload result to GitHub Code Scanning
39+
# uses: github/codeql-action/upload-sarif@v2
40+
# with:
41+
# sarif_file: snyk.sarif

0 commit comments

Comments
 (0)