2024-02-15 02:00:29 +01:00
|
|
|
name: Trivy code and vulnerability scanning
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2024-05-05 08:18:15 +02:00
|
|
|
tags:
|
|
|
|
- '*'
|
2024-02-15 02:00:29 +01:00
|
|
|
schedule:
|
|
|
|
- cron: '00 12 * * *'
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
trivy-scan:
|
|
|
|
name: Trivy Scan
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
security-events: write
|
|
|
|
actions: read
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Run Trivy code and vulnerability scanner on repo
|
2024-07-07 03:20:51 +02:00
|
|
|
uses: aquasecurity/trivy-action@0.24.0
|
2024-02-15 02:00:29 +01:00
|
|
|
with:
|
|
|
|
scan-type: repo
|
|
|
|
format: sarif
|
|
|
|
output: trivy-results.sarif
|
|
|
|
severity: CRITICAL,HIGH,MEDIUM,LOW
|
|
|
|
|
|
|
|
- name: Run Trivy code and vulnerability scanner on filesystem
|
2024-07-07 03:20:51 +02:00
|
|
|
uses: aquasecurity/trivy-action@0.24.0
|
2024-02-15 02:00:29 +01:00
|
|
|
with:
|
|
|
|
scan-type: fs
|
|
|
|
format: sarif
|
|
|
|
output: trivy-results.sarif
|
2024-05-05 08:18:15 +02:00
|
|
|
severity: CRITICAL,HIGH,MEDIUM,LOW
|