| 1 |
name: Scan |
| 2 |
|
| 3 |
on: |
| 4 |
schedule: |
| 5 |
- cron: '0 0 * * *' |
| 6 |
workflow_dispatch: |
| 7 |
|
| 8 |
permissions: {} |
| 9 |
|
| 10 |
|
| 11 |
|
| 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
| 24 |
- name: Run vulnerability scanner |
| 25 |
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 |
| 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@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 |
| 34 |
with: |
| 35 |
sarif_file: 'trivy-results.sarif' |