Skip to content

Run Trivy - Vulnerability Scan #717

Run Trivy - Vulnerability Scan

Run Trivy - Vulnerability Scan #717

Workflow file for this run

name: Run Trivy
run-name: Run Trivy - Vulnerability Scan
on:
push:
schedule:
# At 05:15 UTC on day-of-month 2
- cron: '15 5 2 * *'
jobs:
build:
name: Build
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-server:${{ github.sha }} .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1
with:
image-ref: 'docker.io/gisaia/arlas-server:${{ github.sha }}'
format: 'table'
exit-code: '1'
timeout: '10m'
ignore-unfixed: false
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
trivyignores: .github/workflows/.trivyignore
- 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-server'