| 1 |
name: Scan |
| 2 |
|
| 3 |
on: |
| 4 |
schedule: |
| 5 |
- cron: '0 0 * * *' |
| 6 |
workflow_dispatch: |
| 7 |
|
| 8 |
permissions: {} |
| 9 |
|
| 10 |
# When a PR is updated, cancel the jobs from the previous version. Merges |
| 11 |
# do not define head_ref, so use run_id to never cancel those jobs. |
| 12 |
concurrency: |
| 13 |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 14 |
cancel-in-progress: true |
| 15 |
|
| 16 |
jobs: |
| 17 |
cve-scanner: |
| 18 |
runs-on: ubuntu-latest |
| 19 |
permissions: |
| 20 |
security-events: write |
| 21 |
steps: |
| 22 |
- name: Checkout code |
| 23 |
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 24 |
- name: Run vulnerability scanner |
| 25 |
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # 0.36.0 |
| 26 |
with: |
| 27 |
scan-type: 'fs' |
| 28 |
ignore-unfixed: true |
| 29 |
format: 'sarif' |
| 30 |
output: 'trivy-results.sarif' |
| 31 |
severity: 'MEDIUM,HIGH,CRITICAL' |
| 32 |
- name: Upload Trivy scan results to GitHub Security tab |
| 33 |
uses: github/codeql-action/upload-sarif@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0 |
| 34 |
with: |
| 35 |
sarif_file: 'trivy-results.sarif' |