You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
1.2 KiB

name: Consolidated CI - Repo Trivy Scan
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
schedule:
- cron: '0 4 * * *'
permissions:
contents: read
security-events: write
jobs:
trivy-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner (repo)
uses: aquasecurity/trivy-action@0.33.1
with:
scan-type: repo
ignore-unfixed: true
format: sarif
output: trivy-results.sarif
severity: CRITICAL,HIGH
- name: Upload SARIF results to GitHub Code Scanning (best-effort)
uses: github/code-scanning-action/upload-sarif@v2
continue-on-error: true
with:
sarif_file: 'trivy-results.sarif'
- name: List SARIF file (debug)
if: always()
run: |
echo "Listing SARIF file:"
ls -la trivy-results.sarif || true
- name: Upload Trivy SARIF artifact (always)
if: always()
uses: actions/upload-artifact@v4
with:
name: trivy-sarif
path: trivy-results.sarif