Skip to content

Commit

Permalink
Merge pull request #151 from richardcase/image_scanning
Browse files Browse the repository at this point in the history
feat: add image scanning workflow
  • Loading branch information
furkatgofurov7 authored Jul 17, 2023
2 parents 4416e88 + 6048a87 commit 82dcf96
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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: Build binary
run: make build
- name: Set up Docker Buildx
id: buildx
uses: docker/[email protected]
- name: Build image
uses: docker/[email protected]
with:
context: .
tags: ghcr.io/rancher/gke-operator:${{ github.sha }}
load: true
push: false
file: package/Dockerfile
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "ghcr.io/rancher/gke-operator:${{ github.sha }}"
format: "table"
exit-code: "1"
ignore-unfixed: true
severity: "CRITICAL,HIGH"

0 comments on commit 82dcf96

Please sign in to comment.