ci(338): distinguish ZAP warning (exit 2) from failure (exit 1) in security-scan #452

Merged
timothy merged 1 commits from fix/338-zap-exit-code into main 2026-07-18 18:16:49 +02:00
Owner

security-scan.sh passed ZAP's raw exit code straight through, so a warnings-only run (exit 2) looked like a failure (exit 1). Added classify_zap_exit(): 0=PASS, 2=WARN (script exits 0), 1/124/other=FAIL. Added a docker-free --selftest harness (6 cases) and updated docs/ci-cd.md exit-code contract.

Review: CI-script + docs, no app write-path; orchestrator inline review. bash -n + shellcheck + --selftest all green.

fixes #338

`security-scan.sh` passed ZAP's raw exit code straight through, so a warnings-only run (exit 2) looked like a failure (exit 1). Added `classify_zap_exit()`: 0=PASS, 2=WARN (script exits 0), 1/124/other=FAIL. Added a docker-free `--selftest` harness (6 cases) and updated `docs/ci-cd.md` exit-code contract. **Review:** CI-script + docs, no app write-path; orchestrator inline review. `bash -n` + shellcheck + `--selftest` all green. fixes #338
timothy added 1 commit 2026-07-18 16:57:41 +02:00
ci(338): distinguish ZAP warning (exit 2) from failure (exit 1) in security-scan
Build ErsatzTV Image / CI image pin matches docker/ci (pull_request) Successful in 6s
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 8s
Build ErsatzTV Image / decisions.md append-only (pull_request) Successful in 7s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 7m6s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 7s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 7s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 15m25s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Build ErsatzTV Image / Functional E2E (curl contracts) (pull_request) Successful in 14m36s
c1c6486321
fixes #338

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
Owner

Review-verdict: MERGEABLE @ c1c6486321
CI script + docs, no app write-path. classify_zap_exit contract + docker-free --selftest (6 cases) + docs/ci-cd.md; bash -n + shellcheck + selftest green. Orchestrator inline review.

Review-verdict: MERGEABLE @ c1c64863218c46757ce6c53b86d798f4778afd05 CI script + docs, no app write-path. classify_zap_exit contract + docker-free --selftest (6 cases) + docs/ci-cd.md; bash -n + shellcheck + selftest green. Orchestrator inline review.
timothy merged commit ab8e5d7a91 into main 2026-07-18 18:16:49 +02:00
Sign in to join this conversation.