Skip to content

add

add #738

name: Config Scan
on:
pull_request:
paths:
- .github/workflows/security-scan.yaml
- "k8s/**"
- "trivy.yaml"
- ".trivyignore.yaml"
push:
branches:
- main
paths:
- .github/workflows/security-scan.yaml
- "k8s/**"
- "trivy.yaml"
- ".trivyignore.yaml"
workflow_dispatch:
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
scan-type: "config"
format: "sarif"
output: "trivy-results.sarif"
ignore-unfixed: true
severity: "CRITICAL,HIGH"
trivy-config: trivy.yaml
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"