Skip to content

Commit

Permalink
✨(ci) add security scan
Browse files Browse the repository at this point in the history
Add a security scan for CVE with trivy
  • Loading branch information
rouja authored and Morendil committed Oct 30, 2024
1 parent 2bbed8d commit 2c2dcb5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/docker-hub.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Docker Hub Workflow
run-name: Docker Hub Workflow

on:
workflow_dispatch:
Expand Down Expand Up @@ -48,9 +49,15 @@ jobs:
name: Login to DockerHub
if: github.event_name != 'pull_request'
run: echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USER" --password-stdin
-
name: Run trivy scan
uses: numerique-gouv/action-trivy-cache@main
with:
docker-build-args: '--target backend-production -f Dockerfile'
docker-image-name: 'docker.io/lasuite/people-backend:${{ github.sha }}'
-
name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
target: backend-production
Expand Down Expand Up @@ -92,9 +99,15 @@ jobs:
name: Login to DockerHub
if: github.event_name != 'pull_request'
run: echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USER" --password-stdin
-
name: Run trivy scan
uses: numerique-gouv/action-trivy-cache@main
with:
docker-build-args: '-f Dockerfile --target frontend-production'
docker-image-name: 'docker.io/lasuite/people-frontend:${{ github.sha }}'
-
name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
target: frontend-production
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ and this project adheres to

### Added

- ✨(ci) add security scan #429
- ✨(ci) add helmfile linter and fix argocd sync #424
- ✨(domains) add endpoint to list and retrieve domain accesses #404
- 🍱(dev) embark dimail-api as container #366
Expand Down

0 comments on commit 2c2dcb5

Please sign in to comment.