0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/.github/workflows/pen-tests.yml
simeng-li 64e78024e0
ci(core): disable cloud metadata rule in zap (#4277)
* ci(core): disable cloud metadata rule in zap

disable cloud metadata rule in zap

* fix: update rule files

update rule files

* fix: update the conf file

update the conf file

* fix: revert docker settings

revert docker settings
2023-08-03 10:17:14 +08:00

43 lines
1.1 KiB
YAML

name: Pen Tests
on:
# Be careful when using the workflow_run trigger
# https://github.community/t/workflow-run-completed-event-triggered-by-failed-workflow/128001/7
workflow_run:
workflows: ["Release"]
branches:
- master
types:
- completed
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
zap-scan:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Docker Compose up
run: |
curl -fsSL https://raw.githubusercontent.com/logto-io/logto/HEAD/docker-compose.yml |\
TAG=edge docker compose -p logto -f - up -d
- name: Sleep for 30 seconds
run: sleep 30s
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.5.1
with:
target: http://localhost:3001
cmd_options: "-a"
fail_action: true
allow_issue_writing: false
rules_file_name: ".zap/rules.conf"
# TODO: send slack message on failure