Skip to content

Security Scan

Security Scan #29

name: Security Scan
on:
schedule:
# Run every day at 12 AM IST (which is 6:30 PM UTC)
- cron: "30 18 * * *"
jobs:
trivy:
name: Trivy security scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner sarif output
uses: aquasecurity/trivy-action@master
with:
scan-type: fs
ignore-unfixed: true
severity: 'HIGH,CRITICAL'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
exit : 1
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: 'trivy-results.sarif'