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
8 changes: 4 additions & 4 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: user-15-nginx
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: user-15-wordpress
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: exampleuser
Expand All @@ -42,8 +42,8 @@ services:
restart: unless-stopped

db:
image: mysql:8
container_name: db
image: mysql:latest
container_name: user-15-db
environment:
MYSQL_ROOT_PASSWORD: examplepass
MYSQL_DATABASE: exampledb
Expand Down
Binary file added .github/workflows/.image-scan.yaml.swg
Binary file not shown.
Binary file added .github/workflows/.image-scan.yaml.swh
Binary file not shown.
Binary file added .github/workflows/.image-scan.yaml.swi
Binary file not shown.
Binary file added .github/workflows/.image-scan.yaml.swj
Binary file not shown.
Binary file added .github/workflows/.image-scan.yaml.swk
Binary file not shown.
Binary file added .github/workflows/.image-scan.yaml.swl
Binary file not shown.
Binary file added .github/workflows/.image-scan.yaml.swm
Binary file not shown.
Binary file added .github/workflows/.image-scan.yaml.swn
Binary file not shown.
Binary file added .github/workflows/.image-scan.yaml.swo
Binary file not shown.
Binary file added .github/workflows/.image-scan.yaml.swp
Binary file not shown.
47 changes: 35 additions & 12 deletions .github/workflows/image-scan.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,49 @@
name: Docker Image Scan

on:
'on':
push:
branches: [ main ]
branches:
- main
pull_request:
branches: [ main ]

branches:
- main
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
uses: aquasecurity/trivy-action@master
with:
image-ref: 'ubuntu:impish-20210711'
format: 'table'
exit-code: '1'
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'
severity: 'CRITICAL,HIGH'
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'mysql: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