Merge pull request #266 from jsafrane/bump-sanity-5.3.1 #35
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: Run Trivy scanner for Go version vulnerabilities | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
trivy: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get Go version | |
id: go-version | |
run: | | |
GO_VERSION=$(cat prow.sh | grep "configvar CSI_PROW_GO_VERSION_BUILD" | awk '{print $3}' | sed 's/"//g') | |
echo "version=$GO_VERSION" >> $GITHUB_OUTPUT | |
- name: Run Trivy scanner for Go version vulnerabilities | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: 'golang:${{ steps.go-version.outputs.version }}' | |
format: 'table' | |
exit-code: '1' | |
ignore-unfixed: true | |
vuln-type: 'library' | |
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN' |