Skip to content
Myr

trivy-scan.yml

This file

Path

.github/workflows/trivy-scan.yml

56 lines · 1.4 KiB · YAML

Last changed by

chore(deps): bump the actions group across 1 directory with 4 updates (#4787)dependabot[bot]before adoption00cfe5a

History of this file

Take it

ci: replace vulnerability scanning workflow with Trivy integration (#4421)Bo-Yi Wubefore adoption5e5ff3a

lines 1–10why, one step back
1name: Trivy Security Scan
23on:4 push:5 branches:6 - master7 pull_request:8 branches:9 - master10 schedule:

ci(sec): schedule Trivy security scans to run daily at midnight UTC (#4439)Bo-Yi Wubefore adoptione88fc89

line 11why, one step back
11 # Run daily at 00:00 UTC

ci: update CI workflows and standardize Trivy config quotes (#4531)Bo-Yi Wubefore adoption00900fb

line 12why, one step back
12 - cron: "0 0 * * *"

ci: replace vulnerability scanning workflow with Trivy integration (#4421)Bo-Yi Wubefore adoption5e5ff3a

lines 13–24why, one step back
13 workflow_dispatch: # Allow manual trigger
1415permissions:16 contents: read17 security-events: write # Required for uploading SARIF results1819jobs:20 trivy-scan:21 name: Trivy Security Scan22 runs-on: ubuntu-latest23 steps:24 - name: Checkout code

chore(deps): bump the actions group across 1 directory with 4 updates (#4787)dependabot[bot]before adoption00cfe5a

line 25why, one step back
25 uses: actions/checkout@v7

ci: replace vulnerability scanning workflow with Trivy integration (#4421)Bo-Yi Wubefore adoption5e5ff3a

lines 26–29why, one step back
26 with:
27 fetch-depth: 02829 - name: Run Trivy vulnerability scanner (source code)

chore(deps): bump the actions group across 1 directory with 2 updates (#4640)dependabot[bot]before adoption5f4f964

line 30why, one step back
30 uses: aquasecurity/trivy-action@v0.36.0

ci: replace vulnerability scanning workflow with Trivy integration (#4421)Bo-Yi Wubefore adoption5e5ff3a

line 31why, one step back
31 with:

ci: update CI workflows and standardize Trivy config quotes (#4531)Bo-Yi Wubefore adoption00900fb

lines 32–37why, one step back
32 scan-type: "fs"
33 scan-ref: "."34 scanners: "vuln,secret,misconfig"35 format: "sarif"36 output: "trivy-results.sarif"37 severity: "CRITICAL,HIGH,MEDIUM"

ci: replace vulnerability scanning workflow with Trivy integration (#4421)Bo-Yi Wubefore adoption5e5ff3a

lines 38–40why, one step back
38 ignore-unfixed: true
3940 - name: Upload Trivy results to GitHub Security tab

chore(deps): bump github/codeql-action from 3 to 4 in the actions group (#4425)dependabot[bot]before adoption0c0e99d

line 41why, one step back
41 uses: github/codeql-action/upload-sarif@v4

ci: replace vulnerability scanning workflow with Trivy integration (#4421)Bo-Yi Wubefore adoption5e5ff3a

lines 42–43why, one step back
42 if: always()
43 with:

ci: update CI workflows and standardize Trivy config quotes (#4531)Bo-Yi Wubefore adoption00900fb

line 44why, one step back
44 sarif_file: "trivy-results.sarif"

ci: replace vulnerability scanning workflow with Trivy integration (#4421)Bo-Yi Wubefore adoption5e5ff3a

lines 45–46why, one step back
45
46 - name: Run Trivy scanner (table output for logs)

chore(deps): bump the actions group across 1 directory with 2 updates (#4640)dependabot[bot]before adoption5f4f964

line 47why, one step back
47 uses: aquasecurity/trivy-action@v0.36.0

ci: replace vulnerability scanning workflow with Trivy integration (#4421)Bo-Yi Wubefore adoption5e5ff3a

lines 48–49why, one step back
48 if: always()
49 with:

ci: update CI workflows and standardize Trivy config quotes (#4531)Bo-Yi Wubefore adoption00900fb

lines 50–54why, one step back
50 scan-type: "fs"
51 scan-ref: "."52 scanners: "vuln,secret,misconfig"53 format: "table"54 severity: "CRITICAL,HIGH,MEDIUM"

ci: replace vulnerability scanning workflow with Trivy integration (#4421)Bo-Yi Wubefore adoption5e5ff3a

line 55why, one step back
55 ignore-unfixed: true

ci: update CI workflows and standardize Trivy config quotes (#4531)Bo-Yi Wubefore adoption00900fb

line 56why, one step back
56 exit-code: "1"