From d68db2d450c06bed2fd6dc2ad073766a2e0643a7 Mon Sep 17 00:00:00 2001 From: Puneeth Date: Tue, 31 Oct 2023 10:35:32 +0530 Subject: [PATCH] OWASP #714 : Fixing workflow triggering isues --- .github/workflows/dast-zap-test.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/dast-zap-test.yml b/.github/workflows/dast-zap-test.yml index 8d032dffd..7ece5ce4c 100644 --- a/.github/workflows/dast-zap-test.yml +++ b/.github/workflows/dast-zap-test.yml @@ -18,20 +18,7 @@ jobs: - name: Trigger Building JAR cache if: steps.cache.outputs.cache-hit != 'true' run: | - const { Octokit } = require("@octokit/core"); - const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }); - const { data: workflows } = await octokit.request("GET /repos/commjoen/wrongsecrets/actions/workflows", { - owner: process.env.GITHUB_REPOSITORY.split("/")[0], - repo: process.env.GITHUB_REPOSITORY.split("/")[1] - }); - const secondWorkflow = workflows.workflows.find(w => w.name === "building-jar-cache.yml"); - if (secondWorkflow) { - await octokit.request("POST /repos/commjoen/wrongsecrets/actions/workflows/Building JAR cache/dispatches", { - owner: process.env.GITHUB_REPOSITORY.split("/")[0], - repo: process.env.GITHUB_REPOSITORY.split("/")[1], - workflow_id: secondWorkflow.id - }); - } + gh workflow run "Building JAR cache" --ref "main" - name: Start wrongsecrets run: nohup ./mvnw spring-boot:run -Dspring-boot.run.profiles=without-vault & - name: ZAP Scan