Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/security-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Security Scan

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
trivy-fs:
name: Trivy FS
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run Trivy vulnerability scan
uses: aquasecurity/trivy-action@77137e9dc3ab1b329b7c8a38c2eb7475850a14e8
with:
scan-type: fs
scan-ref: .
format: sarif
output: trivy-results.sarif
severity: CRITICAL,HIGH,MEDIUM,LOW
exit-code: 0
ignore-unfixed: false

- name: Check for critical and high vulnerabilities
uses: aquasecurity/trivy-action@77137e9dc3ab1b329b7c8a38c2eb7475850a14e8
with:
scan-type: fs
scan-ref: .
format: table
severity: CRITICAL,HIGH
exit-code: 1
ignore-unfixed: false

- name: Upload SARIF to Security tab
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: trivy-results.sarif
category: trivy-fs-security-scan
Loading