ci: enable OWASP ZAP baseline DAST scan (#46) - #112
Open
Parzivalart3mis wants to merge 4 commits into
Open
Conversation
The zap-scan.yml skeleton added in Sep 2025 never ran: it targeted the placeholder your-qa-url.example.com and triggered on a `qa` branch that does not exist in this repo. - Point the scan at https://test-saayam.netlify.app, the target validated against this workflow in May 2026 - Fix triggers: PRs to main, a nightly schedule, and manual dispatch - Switch full-scan (active attack mode) to baseline (passive) for the initial rollout - Publish HTML/MD/JSON reports as build artifacts instead of S3, so the workflow needs no AWS credentials - Add .zap/rules.tsv to suppress informational noise while keeping the security-header and CSP rules active - Add permissions and concurrency blocks; disable ZAP issue writing Non-blocking (fail_action: false) for now so findings are reported without failing PRs. To be flipped once the baseline is clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #46 (partially — see Follow-ups).
Background
The
zap-scan.ymlskeleton has existed on theowasp-zapbranch since Sep 2025 but has never run successfully. Two reasons:https://your-qa-url.example.com(a reserved example domain).push/pull_requestto aqabranch, which does not exist in this repo — so once merged tomainit would never fire.Credit where it's due: @umssyed created the original workflow skeleton (his commits are preserved in this branch's history), and @Mdnadeem13 validated the whole approach in May by running ZAP against
test-saayam.netlify.appand confirming real findings. This PR finishes that work rather than restarting it.What this changes
target: your-qa-url.example.comhttps://test-saayam.netlify.app(overridable viaworkflow_dispatch)push: [qa, owasp-zap]— never firespull_request: [main]+ nightly cron + manual dispatchaction-full-scanwith-a(active attack)action-baselinewith-I(passive)fail_action: truefail_action: false(non-blocking for now)permissions:blockpermissions: contents: read+concurrencyallow_issue_writing: falseAlso adds
.zap/rules.tsv, which suppresses four informational rules (timestamp disclosure, cache-control, "modern web app", non-storable content) while deliberately keeping the security-header and CSP rules active — those are the actual findings this issue exists to surface. The file documents that intent inline so the signal doesn't get "cleaned up" later.Scope deviation, flagged deliberately
The issue asks for reports stored in S3. This PR uses GitHub Actions artifacts instead.
S3 requires AWS credentials, which have been the standing blocker on this and several other issues. Artifacts give 30-day retention, need no access provisioning, and match the pattern already used in
playwright-tests.yml. If S3 is a hard requirement, it can be added as a follow-up once credentials exist — this seemed better than leaving DAST unimplemented for another cycle.Verification
.zap/rules.tsvconfirmed tab-separated (ZAP silently ignores space-separated rules files)Five of six missing, which corroborates @Mdnadeem13's May findings and confirms the scan will report real issues. It's also why this lands non-blocking: with
fail_action: true, every PR would fail immediately.Not verified: I could not execute a real ZAP scan locally (no Docker daemon available). The workflow's end-to-end behaviour is unconfirmed until it runs in Actions. Suggest a
workflow_dispatchrun right after merge, before relying on the nightly schedule.Open question
The issue says "QA environment"; @Mdnadeem13 validated against
test-saayam.netlify.app, described as the test environment. If QA and test are distinct here, thetargetvalue should change — it's a one-line edit, andworkflow_dispatchaccepts an override in the meantime. @anisha2207 @umssyed, could you confirm?Follow-ups (not in this PR)
action-full-scanwith-asends real attack payloads. Wants explicit sign-off from @anisha2207 / @umssyed first, especially as the endpoint is Netlify-hosted and their ToS apply.🤖 Generated with Claude Code