Skip to content

Commit

Permalink
feat: scan de vulnérabilité
Browse files Browse the repository at this point in the history
  • Loading branch information
pomverte committed Dec 26, 2023
1 parent 75985cc commit 203235e
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/bats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
IMAGE_TAG: ${{ github.repository }}/bats:v1.10.0-curl

jobs:
build-and-push-docker-image:
build:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -38,6 +38,25 @@ jobs:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_TAG }}

scan:
runs-on: ubuntu-latest
needs: build
steps:
- uses: docker/login-action@v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_TAG }}
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'

check:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 203235e

Please sign in to comment.