Scan with Trivy #554
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: Scan with Trivy | |
on: | |
workflow_run: | |
workflows: ["Build and Push to GHCR"] | |
types: | |
- completed | |
jobs: | |
scan: | |
name: Scan Images | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [current, equuleus] | |
permissions: | |
security-events: write | |
packages: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: 'ghcr.io/${{ github.repository_owner }}/vyos:${{ matrix.version }}' | |
format: 'sarif' | |
output: 'trivy-results.sarif' | |
- name: Upload Trivy scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@689fdc5193eeb735ecb2e52e819e3382876f93f4 # v2 | |
with: | |
sarif_file: 'trivy-results.sarif' |