Skip to content

Vulnerability Scan #1388

Vulnerability Scan

Vulnerability Scan #1388

# 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:
- cron: '0 12 * * *'
workflow_dispatch:
jobs:
scan:
name: Scan docker image with Trivy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build the Docker image
run: docker build . --file Dockerfile --tag symfony-flex-backend:master
- name: Scan image with trivy
uses: lazy-actions/gitrivy@sha356:6edf95fdc8b1fb841a974536316b209cd16f9000 # v3
with:
image-ref: symfony-flex-backend:master
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'