Skip to content

Trivy Security Scan #37

Trivy Security Scan

Trivy Security Scan #37

Workflow file for this run

name: Trivy Security Scan
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 15 * * *" # 23:00 UTC+8
workflow_call:
jobs:
trivy:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: actions/checkout@v6
- name: Trivy vulnerability scan
uses: aquasecurity/trivy-action@0.35.0
with:
scan-type: fs
scan-ref: .
format: sarif
output: trivy-results.sarif
exit-code: 1
severity: CRITICAL,HIGH
- name: Upload results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v4
if: always()
with:
sarif_file: trivy-results.sarif