fleet/.github/workflows/trivy_scan.yml

30 lines
840 B
YAML
Raw Normal View History

name: Trivy vulnerability scan
on:
workflow_dispatch:
schedule:
- cron: '0 4 * * *' # Nightly 4AM UTC
jobs:
build:
name: Trivy
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- 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'
severity: 'CRITICAL'
skip-dirs: 'website/,tools/,infrastructure/,test/,orbit/pkg/insecure/'
trivyignores: '.trivyignore'
security-checks: 'vuln'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'