File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ # A sample workflow which checks out the code, builds a container
2+ # image using Docker and scans that image for vulnerabilities using
3+ # Snyk. The results are then uploaded to GitHub Security Code Scanning
4+ #
5+ # For more examples, including how to limit scans to only high-severity
6+ # issues, monitor images for newly disclosed vulnerabilities in Snyk and
7+ # fail PR checks for new vulnerabilities, see https://github.com/snyk/actions/
8+
9+ name : Snyk Container
10+ on : push
11+ jobs :
12+ snyk :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v2
16+ - name : Build a Docker image
17+ run : docker build -t your/image-to-test .
18+ - name : Run Snyk to check Docker image for vulnerabilities
19+ # Snyk can be used to break the build when it detects vulnerabilities.
20+ # In this case we want to upload the issues to GitHub Code Scanning
21+ continue-on-error : true
22+ uses : snyk/actions/docker@master
23+ env :
24+ # In order to use the Snyk Action you will need to have a Snyk API token.
25+ # More details in https://github.com/snyk/actions#getting-your-snyk-token
26+ # or you can signup for free at https://snyk.io/login
27+ SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
28+ with :
29+ image : your/image-to-test
30+ args : --file=Dockerfile
31+ - name : Upload result to GitHub Code Scanning
32+ uses : github/codeql-action/upload-sarif@v1
33+ with :
34+ sarif_file : snyk.sarif
You can’t perform that action at this time.
0 commit comments