Skip to content

Trivy Docker Image Scan #1487

Trivy Docker Image Scan

Trivy Docker Image Scan #1487

Workflow file for this run

name: Trivy Docker Image Scan
on:
schedule:
# 4am in UTC time.
- cron: '0 4 * * *'
push:
branches:
- '*'
paths:
- 'base/base-image/*'
pull_request:
branches:
- '*'
paths:
- 'base/base-image/*'
jobs:
build:
name: Trivy Docker Image Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build an image from Dockerfile
run: |
docker build --no-cache=true -t ballerina/jre11:v1 ./base/base-image
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'ballerina/jre11:v1'
format: 'table'
exit-code: '1'
ignore-unfixed: true
severity: 'HIGH'