Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 36 additions & 6 deletions .github/workflows/image-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,48 @@ on:
jobs:
scan:
name: Scan Docker Image
runs-on: [runner-2, self-hosted]
runs-on: [runner-1, self-hosted]
steps:
- name: Checkout code
uses: actions/checkout@v3

# https://github.com/aquasecurity/trivy-action?tab=readme-ov-file#inputs
- name: Run Trivy vulnerability scanner
### https://github.com/aquasecurity/trivy-action?tab=readme-ov-file#inputs
- name: Nginx
uses: aquasecurity/trivy-action@master
with:
image-ref: 'ubuntu:impish-20210711'
image-ref: 'nginx:latest'
format: 'table'
exit-code: '1'
exit-code: '0'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
severity: 'CRITICAL,HIGH'
- name: Wordpress
uses: aquasecurity/trivy-action@master
with:
image-ref: 'wordpress:latest'
format: 'table'
exit-code: '0'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
- name: MySQL
uses: aquasecurity/trivy-action@master
with:
image-ref: 'mysql:8'
format: 'table'
exit-code: '0'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'

- name: Test
run: |
cd .cache/ans/single
docker compose up -d
shell: bash