Skip to content

Commit

Permalink
Create trivy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gjofili committed Sep 16, 2024
1 parent c8644db commit fd8cb27
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: trivy
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: trivy
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- 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'

0 comments on commit fd8cb27

Please sign in to comment.