mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
30 lines
840 B
YAML
30 lines
840 B
YAML
|
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'
|