Skip to content

Commit

Permalink
Merge pull request #204 from richardcase/trivy_scanning
Browse files Browse the repository at this point in the history
feat: add image scanning workflow
  • Loading branch information
alexander-demicev authored Jul 17, 2023
2 parents f0ae648 + 08137fe commit 3aee291
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 3aee291

Please sign in to comment.