spike(csp): strict CSP + Trusted Types prototype for the web shell (task 0.4) #51
No reviewers
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit!51
Loading…
Reference in a new issue
No description provided.
Delete branch "spike/csp-prototype"
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?
Task 0.4 exit criteria (dev plan Phase 0): CSP prototype with a per-request nonce pipeline in the Vite build output + Trusted Types, zero unsafe-inline for scripts, console-clean under enforcement.
Delivered:
spikes/csp/serve.mjs— serves the desktop client's Vite build with a per-request nonce CSP (script-src 'self' + nonce, no unsafe-inline), Trusted Types enforcement, SPA fallback, and an/attackpage proving enforcement. Findings recorded in spike-notes.md §0.4: Vite output needs no inline-script allowance at all; the app renders fully under strict CSP; the automation webview blocks all inline scripts pre-CSP (documented limitation — enforcement verification moves to real-browser Phase 2 E2E, manual check documented).Also: roundtrip endpoint render fix (disposed JsonDocument) + access_token surfaced for the 0.5 userinfo probe.
Task 0.4 prototype scope: DONE. Closes #17
ponytail-review (§2.4 AI first-pass) — Verdict: Ship (spike). What this change does: adds a dev-only CSP prototype server (nonce pipeline + Trusted Types + attack page) and documents findings; also fixes a render bug in the roundtrip spike endpoint.
Checked: server binds 127.0.0.1 only; nonce is per-request crypto-random and verified same-request matching via curl; the attack page proves both enforcement and the webview limitation; no prod code touched (desktop dist consumed read-only); docs updated.
Notes (not blocking): the IAB inline-script limitation is an environment artifact, not a CSP defect — real-browser enforcement check documented in spike-notes and deferred to Phase 2 E2E per plan.