ci: remove duplicate copies of go licenses #1795
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: Trivy Container Scan | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ main ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
security-events: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Build the Docker image | |
run: docker build . --file Dockerfile --tag vprodemo.azurecr.io/rpc-go:${{ github.sha }} --tag vprodemo.azurecr.io/rpc-go:latest | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # master | |
with: | |
image-ref: 'vprodemo.azurecr.io/rpc-go:${{ github.sha }}' | |
format: 'sarif' | |
output: 'trivy-results.sarif' | |
exit-code: '1' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
severity: 'UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL' | |
- name: Upload Trivy scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4 | |
if: always() | |
with: | |
sarif_file: 'trivy-results.sarif' |