From f0a2cadbb0d124ffb4a49f8ff1cc4dc7de13cf85 Mon Sep 17 00:00:00 2001 From: adityagajbhiye9 <133367448+adityagajbhiye9@users.noreply.github.com> Date: Fri, 12 Apr 2024 12:58:24 +0530 Subject: [PATCH 1/2] Updated trivy workflow - updated trivy workflow --- .github/workflows/trivy-scan.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/trivy-scan.yml b/.github/workflows/trivy-scan.yml index 6bcc0959..94cc3f6f 100644 --- a/.github/workflows/trivy-scan.yml +++ b/.github/workflows/trivy-scan.yml @@ -1,5 +1,6 @@ ################################################################################ -# Copyright (c) 2021-2022 Contributors to the Eclipse Foundation +# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation +# Copyright (c) 2021,2024 T-Systems International GmbH # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. @@ -25,7 +26,7 @@ on: - main schedule: # Once a day - - cron: "0 0 * * *" + - cron: "0 0 * * 0" workflow_dispatch: # Trigger manually @@ -41,16 +42,18 @@ jobs: steps: - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.12.0 + uses: aquasecurity/trivy-action@0.18.0 with: - # Path to Docker image - image-ref: "tractusx/managed-simple-data-exchanger-frontend:latest" + image-ref: "tractusx/managed-simple-data-exchanger-backend:latest" # Pull image from Docker Hub and run Trivy vulnerability scanner format: "sarif" output: "trivy-results.sarif" - vuln-type: "os,library" + exit-code: "1" # Trivy exits with code 1 if vulnerabilities are found, causing the workflow step to fail. + severity: "CRITICAL,HIGH" # While vulnerabilities of all severities are reported in the SARIF output, the exit code and workflow failure are triggered only by these specified severities (CRITICAL or HIGH). + hide-progress: false - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 + if: always() with: sarif_file: "trivy-results.sarif" From a8cae44925a0b6d43ee9a6e165aca3a9183f96f4 Mon Sep 17 00:00:00 2001 From: adityagajbhiye9 <133367448+adityagajbhiye9@users.noreply.github.com> Date: Fri, 12 Apr 2024 13:00:02 +0530 Subject: [PATCH 2/2] Update trivy-scan.yml --- .github/workflows/trivy-scan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trivy-scan.yml b/.github/workflows/trivy-scan.yml index 94cc3f6f..4a85c40c 100644 --- a/.github/workflows/trivy-scan.yml +++ b/.github/workflows/trivy-scan.yml @@ -1,6 +1,6 @@ ################################################################################ # Copyright (c) 2021,2024 Contributors to the Eclipse Foundation -# Copyright (c) 2021,2024 T-Systems International GmbH +# Copyright (c) 2024 T-Systems International GmbH # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership.