Skip to content

ci: update to latest codeql reporter #4886

ci: update to latest codeql reporter

ci: update to latest codeql reporter #4886

Workflow file for this run

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@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Build the Docker image
run: docker build . --file Dockerfile --tag vprodemo.azurecr.io/mps:${{ github.sha }} --tag vprodemo.azurecr.io/mps:latest
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # master
with:
image-ref: 'vprodemo.azurecr.io/mps:${{ github.sha }}'
format: 'sarif'
output: 'mps-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@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v3.29.5
if: always()
with:
sarif_file: 'mps-trivy-results.sarif'
- name: Upload Trivy Artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: mps-trivy-results.sarif
path: mps-trivy-results.sarif