Skip to content

Commit 5911664

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Docker] [Github-Actions] snyk image scan add at the end.
1 parent 6751466 commit 5911664

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,21 @@ jobs:
2323
run: make compose/run
2424
- name: Tag Docker image
2525
run: docker tag algorithm-exercises-py:latest algorithm-exercises-py:${{ github.sha }}
26+
27+
- name: Run Snyk to check Docker image for vulnerabilities
28+
# Snyk can be used to break the build when it detects vulnerabilities.
29+
# In this case we want to upload the issues to GitHub Code Scanning
30+
continue-on-error: true
31+
uses: snyk/actions/docker@master
32+
env:
33+
# In order to use the Snyk Action you will need to have a Snyk API token.
34+
# See https://docs.snyk.io/integrations/ci-cd-integrations/github-actions-integration#getting-your-snyk-token
35+
# or you can sign up for free at https://snyk.io/login
36+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
37+
with:
38+
image: algorithm-exercises-py:latest
39+
args: --file=Dockerfile
40+
# - name: Upload result to GitHub Code Scanning
41+
# uses: github/codeql-action/upload-sarif@v2
42+
# with:
43+
# sarif_file: snyk.sarif

0 commit comments

Comments
 (0)