Skip to content

Vulnerability Scan #2227

Vulnerability Scan

Vulnerability Scan #2227

# GitHub Actions docs
# https://help.github.com/en/articles/about-github-actions
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Vulnerability Scan
on:
schedule:
# Run every day at 12:00 UTC
- cron: '0 12 * * *'
workflow_dispatch:
jobs:
scan:
name: Scan docker image with Trivy
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Build the Docker image
run: docker build . --file Dockerfile --tag symfony-flex-backend:master
- name: Scan image with Trivy
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # 0.35.0
with:
image-ref: symfony-flex-backend:master
ignore-unfixed: 'true'
exit-code: '1'
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'