You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Survey What Blog Posts Load Before a Blog Content-Security-Policy #501
The family site sends a Content-Security-Policy, and the blog sends none. deploy/README.md "Security headers" states the reason: blog posts embed third-party content, so a policy has to wait for a survey of what the posts load. This issue tracks that survey, which #497 kept out of scope.
Work
List every origin the built site loads from: scripts, frames, images, fonts, and styles, across content/ and the theme's partials.
Draft a policy that allows exactly those origins. Try it first as Content-Security-Policy-Report-Only on local staging, and read the browser console on a sample of posts.
Decide whether to ship it as enforcing or report-only. That decision belongs to the maintainer.
Done
The blog block sends a policy that the posts' own embeds pass, or the README records why the blog has none.
Survey result, from a minified build of develop at b13ce30.
Scripts: no post loads a script from another host. The theme writes four inline scripts, each byte-identical on every page, so they can be listed by hash. The search page loads one script of the site's own.
Frames, objects, forms: none on any page.
Styles and fonts: the site's own CSS, an inline <style> on every page, style= attributes on 16 posts, and Google Fonts.
Decisions, put to the maintainer and answered on 2026-10-24:
Inline scripts are allowed by sha256 hash, with a build gate in make-release.sh that fails when the hashes and the built scripts differ. Not chosen: moving the scripts into a file through theme overrides, or 'unsafe-inline'.
The policy ships enforcing, provided the local staging trial shows no violation beyond those images.
Trial: the policy ran as Content-Security-Policy-Report-Only on local staging. A headless Chromium pass over every rendered URL and the search page recorded securitypolicyviolation events. All 328 pages carried the header. The only violations were the 95 dead images, so the policy ships enforcing.
Activity
ptr727 commentedon Oct 25, 2026
Survey result, from a minified build of
developat b13ce30.<style>on every page,style=attributes on 16 posts, and Google Fonts.404, so they are already broken. Filed as Settle the Dead Hotlinked Images on Eight Archived Posts #513.Decisions, put to the maintainer and answered on 2026-10-24:
make-release.shthat fails when the hashes and the built scripts differ. Not chosen: moving the scripts into a file through theme overrides, or'unsafe-inline'.img-src 'self', leaving the dead origins out, with Settle the Dead Hotlinked Images on Eight Archived Posts #513 filed for the broken images.Trial: the policy ran as
Content-Security-Policy-Report-Onlyon local staging. A headless Chromium pass over every rendered URL and the search page recordedsecuritypolicyviolationevents. All 328 pages carried the header. The only violations were the 95 dead images, so the policy ships enforcing.🤖 Generated with Claude Code