Repository navigation
Conversation
) * Assert the Security Headers on Every Response the Live Check Reads The live check read no security header, so a Caddyfile edit that dropped one passed every gate. Each response it already requests now carries the exact values in checks/security-headers.txt, which a unit case holds to the Caddyfile. One missing .png probes the handle_errors route, at the cost of a static request rather than a page. The preflight and the family pages also print whether the run reached the Cloudflare edge, which replaces the hand probe in OPERATIONS.md. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Read the Headers After the Reload and on Followed Destinations The preflight assertion read the dump taken before the release wait, so a release that changed a header value failed against the previous config. The wait now refreshes the whole dump. A same-origin redirect destination is header-checked too, one header_value reader replaces the copies, and the Caddyfile test reads a bare value as well as a quoted one. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Keep the Header Assertions to This Site's Responses A media hop to another host is no longer held to this site's list, a repeated header reads as its first instance on both read paths, as curl's %header{} does, and a matcher-scoped security header in the Caddyfile fails the sync test rather than being demanded on every response. The curl row in deploy/README.md names the 7.84 floor %header{} needs. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Follow Block Nesting When Reading the Caddyfile's Headers The sync case read each line alone, so a path matcher was skipped and a header inside a matcher-scoped block read as site-wide, and it reached only an allowlist of names. It now tokenizes each line, tracks the block a header sits in, reads every header a site sets on all responses apart from its cache headers and markers, and refuses any other header scoped to fewer responses. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Read the Caddyfile's Headers Through Caddy's Own Parser Each review round found another directive form the hand-written reader misread: path matchers, matcher-scoped blocks, status requirements, scoped deletions. The sync case now runs caddy adapt in a pinned image, offline, and walks the JSON, where a matcher, a require, an error route, or a delete is explicit. Dependabot tracks the image pin. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Treat Grouped Routes and Earlier Responders as Narrowing a Header A header in one of several mutually exclusive handle routes, or behind a handler that answers first, read as site-wide. Both now count as scoped. An error route repeating a value every response already carries is no longer refused. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Read Deferred Writes, Pass-Through Handlers, and Matched Error Routes A deferred header write misses error responses, so it now counts as scoped. A header after encode, rewrite, or templates still reaches every response, and an error route with its own matcher that repeats a site-wide value narrows nothing, so neither is refused any longer. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Count a Header Deletion Only Where It Removes an Asserted Header Removing a header the site never sets on every response, such as Server, narrows nothing the live check asserts, so the sync case no longer refuses it. Deleting a site-wide security header on some responses is still refused, in the main routes and in an error route. Co-Authored-By: Claude Opus 5.5 <[email protected]> * List the 404 Probe in the Sample Plan and Keep the Build's Error --print-sample counted the probe in its static budget without listing it, so the listing and the budget could not be reconciled. It is now a plan row like any other request. A failed build of the Caddy image reports Docker's own output rather than a bare exit status. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Share One Status and Header Check Between Pages and the 404 Probe The 404 probe repeated check_render step for step. Both now call check_status with a label, the expected status, and the URL. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #505 +/- ##
=======================================
Coverage 49.70% 49.70%
=======================================
Files 10 10
Lines 3058 3058
=======================================
Hits 1520 1520
Misses 1538 1538
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
The live-check preflight has a status-validation defect, and the Caddy test invocation currently fails due to a duplicated entrypoint.
1 open issue
What changed in this PR
This pull request promotes exact security-header assertions into the live URL check and adds Caddy configuration parity tests, documentation, and Dependabot tracking.
Changes:
- Validates expected security headers across normal, redirected, followed, media, and
404responses. - Adds pinned Caddy-based configuration synchronization tests.
- Updates operational and deployment documentation with the new checks and requirements.
- Adds Docker dependency tracking for the pinned Caddy image.
Review findings:
checks/check-live-urls.sh: The refreshed preflight must preserve and revalidate the response status after reload convergence. Moderatechecks/tests/test_check_live_urls_sample.py: The Docker invocation must avoid duplicating the image’scaddyentrypoint. CriticalOPERATIONS.mdandchecks/README.md: Minor grammar corrections are needed. Nits
| File | Description |
|---|---|
OPERATIONS.md |
Documents the additional missing-file check, security-header requirements, and proxy verdict output. |
deploy/README.md |
Documents the curl version floor and security-header synchronization contract. |
checks/tests/test_check_live_urls_sample.py |
Tests header assertions, proxy detection, reload convergence, sampling, and Caddyfile parity. |
checks/security-headers.txt |
Defines the expected security headers and exact values for both sites. |
checks/README.md |
Explains the security-header contract, 404 coverage, and Docker-based Caddy parsing. |
checks/check-live-urls.sh |
Reads and validates security headers across live-check responses and adds the missing-file probe. |
checks/caddy/Dockerfile |
Pins the Caddy image used by the configuration tests. |
.github/dependabot.yml |
Adds Docker dependency tracking for the pinned Caddy image on both branches. |
Review effort: Lite
The reload wait refreshed the preflight dump but kept the first status, so a reload that converged on an error passed the preflight. The refresh reads the status too, and a converged answer other than 200 fails. Also tidies three sentences in OPERATIONS.md and checks/README.md. Co-authored-by: Claude Opus 5.5 <[email protected]>
The family site answers its 404 from a handle_errors block of its own, and the live check probed only the blog's. A missing .png on the family host now has to answer 404 with the family's headers, at the cost of one more static request in the sampled run. Co-authored-by: Claude Opus 5.5 <[email protected]>
|
The headline of the round on df563c4, "The family error route lacks coverage for its security headers", is fixed by #507, now merged into develop as 2ada144. The live check requests a missing file on the family host and requires a 404 carrying the family's four security headers, Content-Security-Policy included. |
|
The headline of the round on 2ada144, "require final human review despite having no recorded findings", names no defect. It asks for the maintainer's review, which is the merge decision this promotion is waiting on. Verification behind it: the whole checks/tests suite passes, the full contract passes against the local staging mirror on both sites, and each feature pull request carried a frontier-tier local pass with no open findings. |

Summary
Promotes #504, #506, and #507 to
main. #506 answers this pull request's first review round: the reload wait rechecks the preflight status, and three doc sentences are tidied. #507 answers the second: the family site's404is probed for its headers too.checks/check-live-urls.shasserts the exact security headers inchecks/security-headers.txton every response it already requests, including followed same-origin destinations. A404probe on each site covers itshandle_errorsblock without growing the page budget.<host> proxiedor<host> UNCONFIRMEDfor each host, replacing the hand probe in OPERATIONS.md "Deploying".security-headers.txttodeploy/Caddyfilethroughcaddy adapt, in a Caddy imagechecks/caddy/Dockerfilepins. Dependabot's newdockerentries track that pin once this reachesmain.No site content or served config changes. After merge, the release's VPS deploys run the new check against staging and production.
Closes #500
🤖 Generated with Claude Code