Skip to content

Update trivy_image_scan.yml #3

Update trivy_image_scan.yml

Update trivy_image_scan.yml #3

name: Scan build with trivy
on:
push:
branches:
- main
- develop
pull_request:
jobs:
build:
name: Build and Scan
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build an image from Dockerfile
run: docker build -t docker.io/my-organization/my-app:${{ github.sha }} .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'