Skip to content

Commit

Permalink
added: Snyk and Syft scanning tools for image
Browse files Browse the repository at this point in the history
  • Loading branch information
ammnt committed Apr 29, 2024
1 parent 8461310 commit 316e2b6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,28 @@ jobs:
path: "${{ github.workspace }}/dependency-results.sbom.json"
retention-days: 20

- name: Scan the image and upload dependency results🔍
uses: anchore/sbom-action@v0.15.11
with:
syft-version: v1.3.0
image: ghcr.io/ammnt/nginx:main
artifact-name: image.spdx.json
dependency-snapshot: false

- name: Run Snyk to check Docker image for vulnerabilities🔍
continue-on-error: true
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ghcr.io/ammnt/nginx:main
args: --file=Dockerfile

- name: Upload result to GitHub Code Scanning📊
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif

- name: Push the Docker images to registries💾
run: |
docker push ghcr.io/ammnt/nginx:main
Expand Down

0 comments on commit 316e2b6

Please sign in to comment.