From 53c9459c341b5336697aea47d50ad48337a0f87a Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jul 2024 05:21:50 +0000 Subject: [PATCH 01/11] Yo_Man --- .github/workflows/image-scan.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/image-scan.yaml b/.github/workflows/image-scan.yaml index dd9a342..8b9f870 100644 --- a/.github/workflows/image-scan.yaml +++ b/.github/workflows/image-scan.yaml @@ -9,7 +9,8 @@ on: jobs: scan: name: Scan Docker Image - runs-on: [runner-2, self-hosted] + #runs-on: [runner-2, self-hosted] + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 @@ -18,9 +19,9 @@ jobs: - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: - image-ref: 'ubuntu:impish-20210711' + image-ref: 'mysql:oracle' format: 'table' exit-code: '1' ignore-unfixed: true vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' \ No newline at end of file + severity: 'CRITICAL,HIGH' From 9f5cfbb7439ca93376e04768496ca28cd563ec88 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jul 2024 05:24:18 +0000 Subject: [PATCH 02/11] Yo_man2 --- .github/workflows/image-scan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-scan.yaml b/.github/workflows/image-scan.yaml index 8b9f870..f8a7cb2 100644 --- a/.github/workflows/image-scan.yaml +++ b/.github/workflows/image-scan.yaml @@ -10,7 +10,7 @@ jobs: scan: name: Scan Docker Image #runs-on: [runner-2, self-hosted] - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 From bbe6ffbde5ed0cdc39b88aeea4386631769d481c Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jul 2024 05:27:14 +0000 Subject: [PATCH 03/11] Yo_nginx --- .github/workflows/image-scan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-scan.yaml b/.github/workflows/image-scan.yaml index f8a7cb2..dd64033 100644 --- a/.github/workflows/image-scan.yaml +++ b/.github/workflows/image-scan.yaml @@ -19,7 +19,7 @@ jobs: - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: - image-ref: 'mysql:oracle' + image-ref: 'nginx:latest' format: 'table' exit-code: '1' ignore-unfixed: true From b4575128484f78dd8e60667d5b1dc33a6faff7b9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jul 2024 05:29:11 +0000 Subject: [PATCH 04/11] Yo_wordpress --- .github/workflows/image-scan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-scan.yaml b/.github/workflows/image-scan.yaml index dd64033..df6a066 100644 --- a/.github/workflows/image-scan.yaml +++ b/.github/workflows/image-scan.yaml @@ -19,7 +19,7 @@ jobs: - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: - image-ref: 'nginx:latest' + image-ref: 'wordpress:latest' format: 'table' exit-code: '1' ignore-unfixed: true From ae6b5e974d8398755261e7cac0253b90c470b7e1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jul 2024 05:30:36 +0000 Subject: [PATCH 05/11] Yo_mysql --- .github/workflows/image-scan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-scan.yaml b/.github/workflows/image-scan.yaml index df6a066..399ee85 100644 --- a/.github/workflows/image-scan.yaml +++ b/.github/workflows/image-scan.yaml @@ -19,7 +19,7 @@ jobs: - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: - image-ref: 'wordpress:latest' + image-ref: 'mysql:5.7' format: 'table' exit-code: '1' ignore-unfixed: true From a971d2e980f6f96253006b881392b6c06d013ae9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jul 2024 05:34:05 +0000 Subject: [PATCH 06/11] Yo_mysql_new --- .github/workflows/image-scan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-scan.yaml b/.github/workflows/image-scan.yaml index 399ee85..24c9dd9 100644 --- a/.github/workflows/image-scan.yaml +++ b/.github/workflows/image-scan.yaml @@ -21,7 +21,7 @@ jobs: with: image-ref: 'mysql:5.7' format: 'table' - exit-code: '1' + exit-code: '0' ignore-unfixed: true vuln-type: 'os,library' severity: 'CRITICAL,HIGH' From d7d8f6e058a674d6811304303a3b765539423458 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jul 2024 05:38:54 +0000 Subject: [PATCH 07/11] Yo_Total --- .github/workflows/image-scan.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/image-scan.yaml b/.github/workflows/image-scan.yaml index 24c9dd9..7b11538 100644 --- a/.github/workflows/image-scan.yaml +++ b/.github/workflows/image-scan.yaml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v3 # https://github.com/aquasecurity/trivy-action?tab=readme-ov-file#inputs - - name: Run Trivy vulnerability scanner + - name: Run Mysql uses: aquasecurity/trivy-action@master with: image-ref: 'mysql:5.7' @@ -25,3 +25,21 @@ jobs: ignore-unfixed: true vuln-type: 'os,library' severity: 'CRITICAL,HIGH' + - name: Run nginx + 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 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' From 0dcab33b91f5d29043d93128604b60579ec7243d Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jul 2024 05:49:51 +0000 Subject: [PATCH 08/11] Yo_total_result --- .github/workflows/image-scan.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-scan.yaml b/.github/workflows/image-scan.yaml index 7b11538..e5b1dfe 100644 --- a/.github/workflows/image-scan.yaml +++ b/.github/workflows/image-scan.yaml @@ -9,8 +9,8 @@ on: jobs: scan: name: Scan Docker Image - #runs-on: [runner-2, self-hosted] - runs-on: ubuntu-latest + runs-on: [runner-2, self-hosted] + #runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 @@ -43,3 +43,7 @@ jobs: ignore-unfixed: true vuln-type: 'os,library' severity: 'CRITICAL,HIGH' + - name: Run Test + run: | + ls + shell: bash From 32fa2561fbb96777b10bdf625b390e5864274313 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jul 2024 05:53:53 +0000 Subject: [PATCH 09/11] Yo_Result --- .github/workflows/image-scan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-scan.yaml b/.github/workflows/image-scan.yaml index e5b1dfe..0262160 100644 --- a/.github/workflows/image-scan.yaml +++ b/.github/workflows/image-scan.yaml @@ -9,7 +9,7 @@ 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 From 47f9f7f6c6e525cb860dd18ba2d1f5f1fa5663b9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jul 2024 05:56:07 +0000 Subject: [PATCH 10/11] Yo_result_v2 --- .github/workflows/image-scan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-scan.yaml b/.github/workflows/image-scan.yaml index 0262160..f9ce25d 100644 --- a/.github/workflows/image-scan.yaml +++ b/.github/workflows/image-scan.yaml @@ -9,7 +9,7 @@ on: jobs: scan: name: Scan Docker Image - runs-on: [runner-1, self-hosted] + runs-on: [runner-1, self-hosted] #runs-on: ubuntu-latest steps: - name: Checkout code From 9f4b3b8597ac19c05a88e47b9330541d79f38152 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jul 2024 06:21:13 +0000 Subject: [PATCH 11/11] Yo_user02_upload --- .cache/ans/single/compose.yaml | 6 +++--- .github/workflows/image-scan.yaml | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.cache/ans/single/compose.yaml b/.cache/ans/single/compose.yaml index babe355..0094998 100644 --- a/.cache/ans/single/compose.yaml +++ b/.cache/ans/single/compose.yaml @@ -1,7 +1,7 @@ services: nginx: image: nginx:latest - container_name: nginx + container_name: nginx_tommy9527_user02 volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro ports: @@ -21,7 +21,7 @@ services: wordpress: image: wordpress:latest - container_name: wordpress + container_name: wordpress_tommy9527_user02 environment: WORDPRESS_DB_HOST: db WORDPRESS_DB_USER: exampleuser @@ -43,7 +43,7 @@ services: db: image: mysql:8 - container_name: db + container_name: mysql_tommy9527_user02 environment: MYSQL_ROOT_PASSWORD: examplepass MYSQL_DATABASE: exampledb diff --git a/.github/workflows/image-scan.yaml b/.github/workflows/image-scan.yaml index f9ce25d..9478e60 100644 --- a/.github/workflows/image-scan.yaml +++ b/.github/workflows/image-scan.yaml @@ -45,5 +45,6 @@ jobs: severity: 'CRITICAL,HIGH' - name: Run Test run: | - ls + cd .cache/ans/single + docker compose up -d shell: bash