build(deps): bump actions/setup-go from 5.1.0 to 5.2.0 (#7815) #8236
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: Trivy scanner | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master, 'release-**' ] | |
paths: | |
- '.github/workflows/trivy.yaml' | |
- 'pkg/**.go' | |
- '!pkg/azureclients/v2/**.go' | |
- '!kubetest2-aks/**.go' | |
- 'cmd/**.go' | |
- 'go.*' | |
- '!vendor/**' | |
- 'health-probe-proxy/**' | |
pull_request: | |
branches: [ master, 'release-**' ] | |
paths: | |
- '.github/workflows/trivy.yaml' | |
- 'pkg/**.go' | |
- '!pkg/azureclients/v2/**.go' | |
- '!kubetest2-aks/**.go' | |
- 'cmd/**.go' | |
- 'go.*' | |
- '!vendor/**' | |
- 'health-probe-proxy/**' | |
schedule: | |
- cron: '35 12 * * 4' | |
permissions: | |
contents: read | |
jobs: | |
build: | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version: '>=1.20' | |
check-latest: true | |
id: go | |
- name: Build images | |
run: | | |
export TAG=${{ github.sha }} | |
export IMAGE_TAG=${{ github.sha }} | |
make build-ccm-image | |
make build-node-image-linux-amd64 | |
cd health-probe-proxy && make build-health-probe-proxy-image && cd .. | |
- name: Run Trivy scanner CCM | |
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # master | |
with: | |
image-ref: 'local/azure-cloud-controller-manager:${{ github.sha }}' | |
format: 'table' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN' | |
- name: Run Trivy scanner CNM | |
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # master | |
with: | |
image-ref: 'local/azure-cloud-node-manager:${{ github.sha }}-linux-amd64' | |
format: 'table' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN' | |
- name: Run Trivy scanner health-probe-proxy | |
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # master | |
with: | |
image-ref: 'local/health-probe-proxy:${{ github.sha }}' | |
format: 'sarif' | |
output: 'trivy-health-probe-proxy-linux-results.sarif' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN' | |
- name: Run Trivy vulnerability scanner in repo mode | |
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # master | |
with: | |
scan-type: 'fs' | |
ignore-unfixed: true | |
format: 'github' | |
output: 'dependency-results.sbom.json' | |
image-ref: '.' | |
github-pat: ${{ secrets.GITHUB_TOKEN }} |