Fix Trivy action version format in Docker image scanning workflow #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Scan Docker Images | |
| on: | |
| push: null | |
| pull_request: null | |
| jobs: | |
| scan-images: | |
| name: Scan Docker Images for Vulnerabilities | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Étape pour vérifier le code source | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| # Étape pour configurer Trivy | |
| - name: Setup Trivy | |
| uses: aquasecurity/trivy-action@0.29.0 | |
| with: | |
| version: latest | |
| # Scanner l'image Node.js | |
| - name: Scan Node.js Base Image | |
| run: | | |
| echo "Scanning Node.js image: node:18.20-slim" | |
| trivy image --severity CRITICAL,HIGH node:18.20-slim | |
| # Scanner l'image Nginx | |
| - name: Scan Nginx Base Image | |
| run: | | |
| echo "Scanning Nginx image: nginx:1.24-alpine-slim" | |
| trivy image --severity CRITICAL,HIGH nginx:1.24-alpine-slim |