0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-13 21:30:30 -05:00
logto/.github/workflows/pen-tests.yml

44 lines
1.1 KiB
YAML
Raw Permalink Normal View History

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