Skip to content

Chore #714 : Optimze Github Actions #1306

Chore #714 : Optimze Github Actions

Chore #714 : Optimze Github Actions #1306

Workflow file for this run

name: DAST with ZAP
on:
pull_request:
branches: [master]
workflow_dispatch:
permissions:
contents: read
jobs:
test-dast:
name: DAST test with ZAP
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Trigger Building JAR cache with Git CLI
if: steps.cache.outputs.cache-hit != 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pwd
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
uses: zaproxy/[email protected]
env:
ZAP_AUTH_HEADER_VALUE: "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
ZAP_AUTH_HEADER: "Authorization"
with:
allow_issue_writing: false
docker_name: "owasp/zap2docker-stable"
target: "http://localhost:8080"
rules_file_name: config/zap/rule-config.tsv
fail_action: true
cmd_options: '-z "-configFile /zap/wrk/config/zap/options.prop"'