Skip to content

Commit

Permalink
🔒️ Add trivy container sca
Browse files Browse the repository at this point in the history
  • Loading branch information
devbyaccident committed Sep 27, 2023
1 parent 24304ef commit e75a448
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: build
on:
pull_request:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build an image from Dockerfile
run: |
docker build -t ${{ github.sha }} .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: '${{ github.sha }}'
format: 'table'
exit-code: '1'
severity: 'CRITICAL,HIGH'

0 comments on commit e75a448

Please sign in to comment.