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
Commit the CSP Browser Trial as a Repeatable Check #518
The blog's Content-Security-Policy was proven before it shipped with a browser pass that no committed tool can repeat. A scratch script ran headless Chromium in the Playwright container against local staging. It loaded every URL in checks/golden-urls.txt plus /search/ with a query typed, clicked the code-copy buttons, and scrolled each page. It recorded every securitypolicyviolation event. That event fires for Content-Security-Policy-Report-Only and an enforcing policy alike.
checks/check-csp-scripts.py proves the built scripts match the policy's hashes. It cannot see what a browser blocks at run time: a style, a font, a fetch, an image, or a script the proxy injects. The next policy change, such as #515 or a widened img-src from #513, needs the browser pass again. Today it would have to be rewritten from scratch.
Work
Commit the pass as a script under checks/, taking a base URL and the URL list. It reports each violation with its directive, the blocked URL, and one page it occurred on, and exits non-zero on any violation not on an allow list.
Document how to run it against a mirror in OPERATIONS.md. Cover the Playwright image and the uv invocation that already works on this host.
Decide whether it runs only by hand or also after a local mirror deploy. It needs Docker and a browser image, so it cannot join the unit suite as it stands.
Done
A documented, committed command reproduces the trial against any mirror and reports the policy's violations.
Activity