Skip to content
Open
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions .cache/ans/single/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
nginx:
image: nginx:latest
container_name: nginx
container_name: nginx_user-12
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
Expand All @@ -21,7 +21,7 @@ services:

wordpress:
image: wordpress:latest
container_name: wordpress
container_name: wordpress_user12
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: exampleuser
Expand All @@ -43,7 +43,7 @@ services:

db:
image: mysql:8
container_name: db
container_name: db_user-12
environment:
MYSQL_ROOT_PASSWORD: examplepass
MYSQL_DATABASE: exampledb
Expand Down
33 changes: 29 additions & 4 deletions .github/workflows/image-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ on:
jobs:
scan:
name: Scan Docker Image
runs-on: [runner-2, self-hosted]
runs-on: [runner-1, self-hosted]
#runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -18,9 +19,33 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'ubuntu:impish-20210711'
image-ref: 'mysql:latest'
format: 'table'
exit-code: '1'
exit-code: '0'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
severity: 'CRITICAL,HIGH'

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'nginx:latest'
format: 'table'
exit-code: '0'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
- name: Run Trivy vulnerability scanner
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: test
run: |
cd .cache/ans/single/
docker compose up -d
shell: bash