Skip to content

Commit d68db2d

Browse files
committed
OWASP OWASP#714 : Fixing workflow triggering isues
1 parent 3eb84e5 commit d68db2d

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

.github/workflows/dast-zap-test.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,7 @@ jobs:
1818
- name: Trigger Building JAR cache
1919
if: steps.cache.outputs.cache-hit != 'true'
2020
run: |
21-
const { Octokit } = require("@octokit/core");
22-
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
23-
const { data: workflows } = await octokit.request("GET /repos/commjoen/wrongsecrets/actions/workflows", {
24-
owner: process.env.GITHUB_REPOSITORY.split("/")[0],
25-
repo: process.env.GITHUB_REPOSITORY.split("/")[1]
26-
});
27-
const secondWorkflow = workflows.workflows.find(w => w.name === "building-jar-cache.yml");
28-
if (secondWorkflow) {
29-
await octokit.request("POST /repos/commjoen/wrongsecrets/actions/workflows/Building JAR cache/dispatches", {
30-
owner: process.env.GITHUB_REPOSITORY.split("/")[0],
31-
repo: process.env.GITHUB_REPOSITORY.split("/")[1],
32-
workflow_id: secondWorkflow.id
33-
});
34-
}
21+
gh workflow run "Building JAR cache" --ref "main"
3522
- name: Start wrongsecrets
3623
run: nohup ./mvnw spring-boot:run -Dspring-boot.run.profiles=without-vault &
3724
- name: ZAP Scan

0 commit comments

Comments
 (0)