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 db2433c
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 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,28 @@ jobs:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_TAG }}

scan:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
needs: build
steps:
- uses: docker/[email protected]
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 db2433c

Please sign in to comment.