Skip to content

Run Trivy - Vulnerability Scan #208

Run Trivy - Vulnerability Scan

Run Trivy - Vulnerability Scan #208

Workflow file for this run

name: Run Trivy
run-name: Run Trivy - Vulnerability Scan
on:
pull_request:
branches:
- develop
schedule:
# At 05:15 UTC on day-of-month 2
- cron: '15 5 2 * *'
jobs:
scan:
name: Vulnerability Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.1.4
- name: Build an image from Dockerfile
run: |
docker build -t docker.io/gisaia/arlas-wui-builder:${{ github.sha }} .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
with:
image-ref: "docker.io/gisaia/arlas-wui-builder:${{ github.sha }}"
format: "table"
exit-code: "1"
ignore-unfixed: true
vuln-type: "os,library"
severity: "CRITICAL,HIGH"
- name: Notify Google Chat
if: ${{ always() }} # Use always to ensure that the notification is also send on failure of former steps
uses: SimonScholz/google-chat-action@main
with:
webhookUrl: '${{ secrets.GOOGLE_CHAT_SCAN_CHANEL }}'
jobStatus: '${{ job.status }}'
title: 'Trivy Scan on ARLAS-wui-builder'