Repository navigation
Trivy Security Scan #4
This file contains hidden or 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 Security Scan | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| schedule: | |
| - cron: "0 0 * * *" # Daily scan at midnight UTC | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| trivy-scan: | |
| name: Trivy Security Scan | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Run Trivy vulnerability scanner (table output) | |
| uses: aquasecurity/trivy-action@v0.36.0 | |
| if: always() | |
| with: | |
| scan-type: "fs" | |
| scan-ref: "." | |
| format: "table" | |
| severity: "CRITICAL,HIGH" | |
| scanners: "vuln,secret,misconfig" | |
| exit-code: "1" |