Skip to content

trivy

trivy #495

Workflow file for this run

name: trivy
on:
schedule:
- cron: "40 11 * * 0"
workflow_dispatch:
workflow_run:
workflows:
- Release Retina Container Images
types:
- completed
permissions:
contents: read
jobs:
scan:
permissions:
contents: read
security-events: write
name: Trivy Scan
strategy:
fail-fast: false
matrix:
image: ["retina-agent", "retina-init", "retina-operator", "kubectl-retina", "retina-shell"]
runs-on: ubuntu-latest # trivy only supports running on Linux
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get Tag
run: |
echo "TAG=$(make version)" >> $GITHUB_ENV
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0
with:
image-ref: "ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ env.TAG }}"
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
severity: "CRITICAL,HIGH"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"