Skip to content

Merge pull request #1425 from rancher/dependabot/go_modules/release-v… #2285

Merge pull request #1425 from rancher/dependabot/go_modules/release-v…

Merge pull request #1425 from rancher/dependabot/go_modules/release-v… #2285

Workflow file for this run

name: Scan
on:
workflow_dispatch:
pull_request:
branches: [ "main", "release-v*" ]
push:
branches:
- main
tags:
- "v*"
jobs:
scan:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version-file: 'go.mod'
check-latest: true
- name: Build operator
run: make operator
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Build image
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0
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@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
env:
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
with:
image-ref: "ghcr.io/rancher/gke-operator:${{ github.sha }}"
format: "table"
exit-code: "1"
ignore-unfixed: true
severity: "CRITICAL,HIGH"