Merge branch 'master' into patch-docs-3.17.1 #1493
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: scan_vulns | |
on: | |
push: | |
paths-ignore: | |
- ".github/workflows/website.yaml" | |
- "docs/**" | |
- "library/**" | |
- "demo/**" | |
- "deprecated/**" | |
- "example/**" | |
- "website/**" | |
- "**.md" | |
- "!cmd/build/helmify/static/README.md" | |
pull_request: | |
paths-ignore: | |
- ".github/workflows/website.yaml" | |
- "docs/**" | |
- "library/**" | |
- "demo/**" | |
- "deprecated/**" | |
- "example/**" | |
- "website/**" | |
- "**.md" | |
- "!cmd/build/helmify/static/README.md" | |
permissions: read-all | |
jobs: | |
govulncheck: | |
name: "Run govulncheck" | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: "1.22" | |
check-latest: true | |
- uses: golang/govulncheck-action@dd0578b371c987f96d1185abb54344b44352bd58 # v1.0.3 | |
scan_vulnerabilities: | |
name: "[Trivy] Scan for vulnerabilities" | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- name: Download trivy | |
run: | | |
pushd $(mktemp -d) | |
wget https://github.com/aquasecurity/trivy/releases/download/v${{ env.TRIVY_VERSION }}/trivy_${{ env.TRIVY_VERSION }}_Linux-64bit.tar.gz | |
tar zxvf trivy_${{ env.TRIVY_VERSION }}_Linux-64bit.tar.gz | |
echo "$(pwd)" >> $GITHUB_PATH | |
env: | |
TRIVY_VERSION: "0.46.0" | |
- name: Run trivy on git repository | |
run: | | |
trivy fs --format table --ignore-unfixed --skip-dirs website --scanners vuln . | |
- name: Build docker images | |
run: | | |
make docker-buildx \ | |
IMG=gatekeeper-e2e:latest | |
make docker-buildx-crds \ | |
CRD_IMG=gatekeeper-crds:latest | |
- name: Run trivy on images | |
run: | | |
for img in "gatekeeper-e2e:latest" "gatekeeper-crds:latest"; do | |
trivy image --ignore-unfixed --vuln-type="os,library" "${img}" | |
done |