Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: scan operator image using Dockle and Snyk #3300

Merged
merged 3 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,39 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build for scan
uses: docker/build-push-action@v5
with:
platforms: "linux/amd64"
context: .
push: false
load: true
build-args: |
VERSION=${{ env.VERSION }}
tags: ${{ steps.docker-meta.outputs.tags }}

- name: Dockle scan
uses: erzz/dockle-action@v1
with:
image: ${{ steps.docker-meta.outputs.tags }}
exit-code: '1'
failure-threshold: WARN
accept-keywords: key

- name: Run Snyk to check Docker image for vulnerabilities
uses: snyk/actions/docker@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ steps.docker-meta.outputs.tags }}
args: --severity-threshold=high --file=Dockerfile

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

- name: Build and push
uses: docker/build-push-action@v5
with:
Expand Down
1 change: 1 addition & 0 deletions .wokeignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ licenses
testdata
releases/
.github/workflows/release-publish.yml
.github/workflows/continuous-integration.yml
Loading