Created
June 9, 2025 15:24
-
-
Save initcron/dedbe8a2ae23c7ebab901654b4a3eb63 to your computer and use it in GitHub Desktop.
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: Trivy Vulnerability Scan | |
on: | |
push: | |
branches: [ main, master ] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
trivy: | |
name: Run Trivy Scan | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker Image | |
run: docker build -t vote:test . | |
- name: Run Trivy Scan | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: 'vote:test' | |
format: 'table' | |
exit-code: '0' | |
severity: 'CRITICAL,HIGH' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment