Skip to content

Commit

Permalink
Scan Docker images in Snyk Github action (close #131)
Browse files Browse the repository at this point in the history
Note that even though we are already creating docker images in `ci.yml`, they are pushed to the remote
registry only, and that is why here we additionally add a step to create local Docker images for the
Snyk scan.
  • Loading branch information
spenes committed Apr 4, 2023
1 parent 789fe22 commit a009946
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,15 @@ jobs:
platforms: linux/amd64,linux/arm64/v8
tags: ${{ steps.meta-distroless.outputs.tags }}
push: true
- name: Build local distroless image, which is needed to run Snyk
if: ${{ !contains(steps.ver.outputs.tag, 'rc') }}
run: sbt "project igluServerDistroless" docker:publishLocal
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/docker@master
if: ${{ !contains(steps.ver.outputs.tag, 'rc') }}
with:
image: "snowplow/iglu-server:${{ steps.ver.outputs.tag }}-distroless"
args: "--app-vulns --org=data-processing-new"
command: monitor
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
20 changes: 0 additions & 20 deletions .github/workflows/snyk.yml

This file was deleted.

0 comments on commit a009946

Please sign in to comment.