Backport Slugkit browser security headers with trusted site nonce wiring #20
No reviewers
Labels
No labels
bug
priority:high
status:active
status:inprogress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erik/erikvancraddock.com!20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task-dae6192b-security-headers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Scoped backport for task-dae6192b of merged Slugkit PR #296 / fdfd33ea485b8800c4aee86751d0d985d0bb46e8 onto deployed 0.3.12, preserving site branding/CSRF/API/federation. Adds global nonce CSP, DENY framing, nosniff, referrer and minimal permissions policy; trusted nonce wiring includes the site's About/Fediverse follow script and existing setup/settings/public scripts. Swagger major-5 scripts are nonced; its CDN style exception is docs-only and remote validator disabled. No unsafe-inline/eval, added isolation policies, wildcard executable origins, HTML rewriting or forwarding-header HSTS inference.
HSTS stays off by default/local. Companion homelab PR prepares explicit production max-age=300, no subdomains/preload, alongside already-verified HTTPS origin/Traefik TLS. Both merges/publication remain human-gated; image publication auto-deploys. Proposed release is 0.3.13, not yet published. No new backup/secret/database operation.
Verification
.inline{display:inline}, discovered from test source; no layout stylesheet rewrite. Raw diff is large because existing CSS is minified.Deployment/closure evidence
Review current implementation/configuration; actual deployed-header/post-publication criteria remain pending, not claimed met by local tests. After approved merge/publication, production verification is read-only release/image/header inspection, not login/passkey/upload/key/user/other workflow tests. Documented rollback retains CSRF by pinning prior 0.3.12 index through approved GitOps automation suspension, preserves data/secrets, and maintains HTTPS while the short cached HSTS lifetime expires.
Independent bounded review — website PR #20
Task: task-dae6192b
PR: #20
Reviewed head:
fdcee3f2eeCompanion: homelab #139 at e1e5def43b0742b47d60eb5ed9de9c2bfc7434f8
Summary and provenance
Reviewed current open PR title/body and all non-CSS diff blocks in /tmp/evc-headers-pr20-noncss.patch, excluding only a/src/styles/public.css from /tmp/evc-headers-pr20-full.patch. Independently compared raw CSS old/new lines and tracked CSS against origin/main: exactly one added .inline{display:inline}, otherwise byte-identical; new test source has the inline identifier, consistent with Tailwind source detection. This is not a stylesheet rewrite.
Independently byte-compared src/security/headers.ts to merged Slugkit #296 commit fdfd33ea485b8800c4aee86751d0d985d0bb46e8 at template/site/src/security/headers.ts: identical. Middleware precedes setup/CSRF/routes; AsyncLocalStorage isolates trusted request nonces and HTML no-store prevents nonce reuse via caches. Trusted public/settings/setup/About hooks and scoped Swagger renderer reviewed. No arbitrary HTML rewriting or new executable-origin allowance.
Changed-path inventory contains no dependency/lockfile/Playwright-config/CI-release-workflow/release-skill changes. No API/federation/CSRF behavioral changes. Existing setup-gate liveness test adaptation avoids unrelated upstream behavior adoption.
Evidence reused, not rerun
Read existing /tmp/evc-headers-{build,lint,tests,ci-tests,browser,image-build,image-check,homelab-tests,homelab-dry-run}.log summaries: build/lint, 468 full tests, 392 CI-safe tests, 40 local browser checks, local image build/0.3.13 validation, 47 offline homelab tests and schema-client dry-run. Task/PR evidence reports 31 header/config cases, full Kustomize/whitespace and isolated fake mail/media/virtual authenticator. Parent resolved website CI #73 success at this exact head; reused that result without new CI/network checks. Homelab has no applicable workflow, not a green CI claim.
No tests/builds/browser/containers/production operations were run in this review. Local image evidence does not establish published/deployed headers.
Original acceptance criteria (all six)
Counts: criteria_total=6; criteria_met=3; criteria_partial=3; criteria_missing=0. Here missing counts not-evident criteria; partial criteria are explicitly not fully met.
Decision and approval boundary
approved, for implementation/configuration review only. No not-evident criterion, missing logic test, correctness issue or policy violation found. The three partial criteria have substantive repository/local evidence; their outstanding production observations belong to the separately approved deployment phase, not an implementation defect. This is not task completion or a claim of public headers.
Blocking issues: 0. Warnings: 0. Deferred approval-gated observations are recorded as partial criteria, not invented remediation requirements.
Require explicit human merge approval for each PR; homelab main auto-applies and may restart production. Publication/deployment/HSTS activation and task closure require separate approval. Proposed 0.3.13 remains unpublished; neither PR was merged. Later production verification is limited to read-only release/image/header inspection. No production workflow/browser/auth tests, new backups, secrets or dependency remediation are prerequisites for this header-only scope.