Created
December 14, 2022 20:25
-
-
Save andrisro/ac7672a4bac94e56d7c5963d084c2b96 to your computer and use it in GitHub Desktop.
Github Actions - Scan Image .github/workflows/run.yml
This file contains 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: initial-pipeline | |
on: push | |
jobs: | |
security_scan: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pull image | |
run: | | |
docker pull $IMAGE_TO_SCAN | |
env: | |
IMAGE_TO_SCAN: "nginx:latest" | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: nginx:latest | |
format: 'table' | |
exit-code: '1' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
severity: 'CRITICAL,HIGH' | |
env: | |
IMAGE_TO_SCAN: "nginx:latest" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment