Skip to content

Trivy Repo Scan

Trivy Repo Scan #638

# From: https://github.com/aquasecurity/trivy-action
name: "Trivy Repo Scan"
on:
push:
branches: [ main, development ]
pull_request:
branches: [ main, development ]
schedule:
- cron: '32 15 * * 3'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'