Skip to content

Commit

Permalink
feat: add image scanning workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Case <[email protected]>
  • Loading branch information
richardcase committed Jul 14, 2023
1 parent 73e04bd commit 08137fe
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Scan
on:
pull_request:
push:
branches:
- master
tags:
- "v*"
jobs:
scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Docker Buildx
id: buildx
uses: docker/[email protected]
- name: Build image
uses: docker/[email protected]
with:
context: .
tags: ghcr.io/rancher/eks-operator:${{ github.sha }}
load: true
push: false
file: test/e2e/Dockerfile.e2e
build-args: |
TAG=${{ github.sha }}
REPO=ghcr.io/rancher/eks-operator
COMMIT=${{ github.sha }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "ghcr.io/rancher/eks-operator:${{ github.sha }}"
format: "table"
exit-code: "1"
ignore-unfixed: true
severity: "CRITICAL,HIGH"

0 comments on commit 08137fe

Please sign in to comment.