Skip to content

fix(headers): add includeSubDomains to HSTS (R2) - #233

Merged
scrimshawlife-ctrl merged 2 commits into
mainfrom
fix/hsts-include-subdomains
Oct 28, 2026
Merged

scrimshawlife-ctrl merged 2 commits into
mainfrom
fix/hsts-include-subdomains

Conversation

@scrimshawlife-ctrl

@scrimshawlife-ctrl scrimshawlife-ctrl commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Every Worker response now sends Strict-Transport-Security: max-age=31536000; includeSubDomains (was max-age=31536000). preload stays off.

Why: a Cloudflare zone audit of j-chain.net on 2026-10-27 confirmed every subdomain either serves HTTPS only (img-origin.j-chain.net, the R2 custom domain, min TLS 1.2, Worker-only via the WAF rule) or carries no web traffic (cf-bounce mail records). The same audit turned on Always Use HTTPS and min TLS 1.2 at the zone, so HTTP now redirects before HSTS matters.

Already deployed. This commit is live as build 48cc559 (Worker version f565946e…), deployed from this branch on top of main (a8f22f2) with the runbook command. npm run smoke -- https://j-chain.net passed all checks. Until this merges, main is one commit behind production, and a deploy from main would drop the header back.

Changes:

  • src/ops.ts: the header value in withSecurityHeaders
  • test/ops.test.ts, scripts/smoke.mjs: expected value
  • docs/SPEC.md R2: header text, and the includeSubDomains line now records the 2026-10-27 request. The v0.2.22 "Needs Danny" entry stays as history. Danny: R2 said each flag needs your yes. Please confirm includeSubDomains. preload still needs a separate yes.
  • docs/RUNBOOK.md: smoke check description, and a new Zone security baseline section (the zone settings set on 2026-10-27)
  • docs/TICKETS.md: Now log entry for the 2026-10-27 zone hardening and the manual deploy of 48cc559

Checklist

  • One ticket; spec IDs referenced (R2)
  • Tests passing (npm test: 589/589; tsc --noEmit clean)
  • SPEC.md updated (R2)
  • State-machine changes: n/a
  • Board content still treated as untrusted data (no change)
  • No credentials, .env, or real user data
  • Cost impact: none
  • Security impact: browsers that have seen the header refuse plain HTTP on every *.j-chain.net host for a year. Any future subdomain must serve HTTPS.

🤖 Generated with Claude Code

Every subdomain in the j-chain.net zone serves HTTPS (img-origin) or no
web traffic (cf-bounce mail records), so the one-year HSTS header now
covers subdomains too. preload stays off and still needs Danny's yes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T00:25:38.866632Z 48cc559 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…eline

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scrimshawlife-ctrl
scrimshawlife-ctrl merged commit da57d90 into main Oct 28, 2026
4 checks passed
@scrimshawlife-ctrl
scrimshawlife-ctrl deleted the fix/hsts-include-subdomains branch October 28, 2026 06:58
scrimshawlife-ctrl added a commit that referenced this pull request Oct 29, 2026
Danny confirmed includeSubDomains on 2026-10-28, after the 2026-10-27
zone audit (#233). The 2026-10-22 decision is marked superseded for that
flag; preload still needs a separate yes.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant