From 446d275a6747b194c2ede0f56a121c509c4493aa Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 5 Dec 2026 09:29:04 +0000 Subject: [PATCH 1/2] fix(deploy): publish without ssg's _headers Cloudflare injects an inline bot-detection script (__CF$cv$params) into every page on this zone. The CSP in ssg's _headers allows only 'self' scripts, so it blocked that script and every page logged a CSP error, which fails Lighthouse Best Practices ("no browser errors"). make build now drops _headers; each page's meta CSP, which allows the script, governs as it did on GitHub Pages. Seen on production after v0.0.3: 19 of 19 pages logged the error. Local wrangler dev does not inject the script, so it showed none. Signed-off-by: Sebastien Rousseau Assisted-by: Claude Code:claude-opus-5-5 [Bash, Read, Edit] --- Makefile | 8 +++++- README.md | 4 ++- docs/_headers | 76 --------------------------------------------------- 3 files changed, 10 insertions(+), 78 deletions(-) delete mode 100644 docs/_headers diff --git a/Makefile b/Makefile index 57e20ea..d29257a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 OR MIT -# Semantic Version: v0.0.3 +# Semantic Version: v0.0.4 .PHONY: all build audit test contrast validate seo compress prune clean help all: build @@ -27,6 +27,12 @@ build: @echo alienstudio.com > docs/CNAME @# ssg's build caches and sidecars are not part of the site. @rm -rf docs/.meta docs/.ssg docs/.ssg-cache docs/.ssg-plugin-cache.json + @# Cloudflare applies _headers, and ssg's CSP there allows only 'self' + @# scripts. This zone injects Cloudflare's inline bot-detection script + @# into every page, so that policy blocks it and each page logs a CSP + @# error (a Lighthouse Best Practices failure). Ship without it; the + @# pages' meta CSP, which allows it, stays in force (ssg plan F46). + @rm -f docs/_headers audit: contrast validate seo @if pa11y-ci --version >/dev/null 2>&1; then \ diff --git a/README.md b/README.md index fb4c1fd..e1b7c3d 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,9 @@ assets (`wrangler.jsonc`, `.github/workflows/deploy-cloudflare.yml`): - a push to `main` deploys production at alienstudio.com. `worker/notFound.js` answers unknown paths with the 404 page and a 404 -status, and `docs/_headers` (written by ssg) adds the security headers. +status. ssg's `_headers` is not published: Cloudflare injects an inline +bot-detection script that its CSP would block, so each page's meta CSP +governs. CI fails when the ssg pin is not the latest release or did not build `docs/` (`scripts/check-ssg-pin.py`), and runs axe-core on every page. diff --git a/docs/_headers b/docs/_headers deleted file mode 100644 index 2cdbc5e..0000000 --- a/docs/_headers +++ /dev/null @@ -1,76 +0,0 @@ -# ssg edge-headers: Netlify _headers -# ---------------------------------- -# PQC posture: TLS 1.3 with the X25519+ML-KEM-768 hybrid -# key-exchange suite (RFC 9420 / draft-ietf-tls-hybrid-design). -# Cloudflare auto-negotiates as of mid-2026; Netlify is -# behind an opt-in in the platform dashboard; Vercel surfaces -# the suite once the upstream CDN (Cloudflare/AWS) enables it. -# Configure at the platform level — this file is documentation -# of the recommended posture, not a runtime knob. -# Cloudflare: https://developers.cloudflare.com/ssl/post-quantum-cryptography/ -# Netlify: https://docs.netlify.com/edge-functions/overview/ -# Vercel: https://vercel.com/docs/edge-network/headers - -/* - Strict-Transport-Security: max-age=63072000; includeSubDomains; preload - Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - X-Content-Type-Options: nosniff - Referrer-Policy: strict-origin-when-cross-origin - Permissions-Policy: camera=(), geolocation=(), microphone=() - -/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-MCHsAq8V0LrJzofe4h2SNhRWHF0TjSjUNuBLPpXtZgM='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/404/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-WObbB8SxwrfR7skUygIzN7dE2mMjkA6B85nVDtihcH0=' 'sha256-5xUohFcMhPzwu0qIUvjNB9i9xSrkgNM1p8wam+PZkng='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/about/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-cFG1GLfT94fDIcDh+dWye93FHqSe5Gzqh+g/oSfnxJI=' 'sha256-I3FbcvnN8Xv4OtnAFbrdEgSm/emdxYPW9N42wWMvEVU='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/accessibility/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-jjBhUNI6DgiZKHyy1KxosUdyrvHUlZTYsJwOsHT81oo=' 'sha256-5kZO63YBghm+6+mBmX5oFzNUwYGB86lRxp5BS/DnrkA='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/collections/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-mCxPo16paDzcHhqLwMFAZ+3kZ7md6VQ/xXtIP2XEfhQ=' 'sha256-RmBetgD3vTQxFDF7Bku4GqOmQAYQx+FXvNu+1nwob/k='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/contact/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-p6dobEix+KX0SufUxru2lVi715BLOrJ2xGm/smlxmdg=' 'sha256-F61x+VWFJwz1SmrkCSCQx68YJGWEHUXUMhouUgfksx8='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/ethereal/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-9ybbl4Hob6hrk2OOVsoQiXVVAlxgqmDt+O3oa9Mzw7w=' 'sha256-bEVPmi70YCEzC9Yn8pGF3w2hBXJ6gdAJYpqwGkbLj8Y='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/made-with-ssg/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-z3BYesnq5/dVJZu93jwgbC0I1KBCa8hhzFTypVymSxI=' 'sha256-Pi+rd4Ph2VmbK8Cg3+j1WplBwSaHiMQZiYypSAySZaU='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/metropolis/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-kXxXjp5PYtLf7qmeL22dke+y5w+i14XvL1+CBtMs+JA=' 'sha256-kwYNx22dmOVzLztV1tQp0bSqRSuv46ctHJGtaO7fzqM='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/odyssey/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-wbMprSEJtrl+zBgWR0T9fKPViOroU9I8lFBRtRHyj5E=' 'sha256-/BQ6u1PPFSpzjYqodIiPVDcTdh4iQHiXlw2Ak85FdtY='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/offline/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-kYayUGdP137lsNSBdfgkynxAVCx25cy9PUCWBel7Amw=' 'sha256-AnS1IVJAqR/x28FGnanIyGHVjkKJtevX/t/EbaeqxAA='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/privacy/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-K+W2tt9LwGhkqa5qdhZfh2v0kiedLtt39g4WyOuVmeU=' 'sha256-mH9GWC4TVz8kbXvqtUhNdMciK4LGQkalYg5grWiCF/o='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/radiance/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-Uz0+bL3171MdkLyGlVFsK6nhOBo9Bzeo4BGeqSB6C9U=' 'sha256-dlp866Z5cyBQLSQn0PsbgaWhuh2BwS499hRCnU/gWis='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/savanna/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-fyT4a6iY2g65kt3YPFdvkfOxSsqMXL/dsRXbC7FN6PA=' 'sha256-+J+5IgY9vMsr/+wdIidNwNI4JzjaYC90pjrLsuNNsTo='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/serenity/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-C5FxHg/HCGN9kK1vAnI6lE3BdwPgYuDzAhHFK0b8DmY=' 'sha256-iMxu2afyeD96Uxngdb+gY793rwhxenALmqPHESbtwIA='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/tags/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-o0ty0NMDhOScXxw4/P2IhcAW+5C7UChBryzSPWqkVew=' 'sha256-91XPaT8RgRMu7m9eUw6+riLBWlZaUYg8MisOZ2bGpXw='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/terms/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-Ia6TJ4mdvOZnTqiozAR4zINEYDJf6OXGO0DX4Cofxkw=' 'sha256-rW5bCAPT45QkjfC2abQm5I9fQ+GU7QYsZ3lPw9N2/Ss='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/thanks/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-IChLsxEI/DjP1xkBg3rEu63w2sRsKMo3fxgsSPzW/Zs=' 'sha256-kBmh3G2OZB4HN2/fLSb0I7myCWh38qTC7nTHRrdwjLY='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' - -/xiqing/ - Content-Security-Policy: default-src 'self'; script-src 'self' 'sha256-QMBvpwXCKN/G2ugCnBuXI0G8l9y44ar1xA79QGDnDu0=' 'sha256-/OH0n2WJiT45HxC5l2YiAmNlaNYPGU2hhhC3pu+d67g='; style-src 'self'; img-src 'self' https: data:; font-src 'self' https:; connect-src 'self'; frame-ancestors 'none' From 6e6b110c8b7d58480ec62d7234eeb99172fc1360 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 5 Dec 2026 09:29:04 +0000 Subject: [PATCH 2/2] chore(release): v0.0.4 Signed-off-by: Sebastien Rousseau Assisted-by: Claude Code:claude-opus-5-5 [Bash, Read, Edit] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index bcab45a..81340c7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.3 +0.0.4