Skip to content

Instantly share code, notes, and snippets.

@andrisro
Created December 14, 2022 20:25
Show Gist options
  • Save andrisro/ac7672a4bac94e56d7c5963d084c2b96 to your computer and use it in GitHub Desktop.
Save andrisro/ac7672a4bac94e56d7c5963d084c2b96 to your computer and use it in GitHub Desktop.
Github Actions - Scan Image .github/workflows/run.yml
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