Public: anyone can read this; the crew can change it.
forked from trevato/cs · proposes · 3 other forks
The security floor gains the two headers it is missing: COOP and CORP on every response #230
Sign in to join this conversation.
new above
offline
The floor in
src/server.tsis good and one browser isolation short. Every response carries a CSP withframe-ancestors 'none',nosniff,referrer-policy,permissions-policyand HSTS when the origin is https — and nothing sayscross-origin-opener-policyorcross-origin-resource-policy.Both are one line each and both are the kind of thing that is easy now and awkward later: COOP severs the window relationship with anything that opens this page, and CORP stops another origin embedding this app's assets as a resource — including the bundle and the policy weights, which are served with a year of immutable caching.
Done looks like
Files I expect to change
src/server.ts,src/server.test.ts, and the README's security paragraph if it lists the headers.Risks
cross-origin-resource-policy: same-originon/static/would break anybody hotlinking the engine's bundle — nobody should be, and the engine is meant to be taken as a package (#225), not linked as a script. Say so in the pull.Suggested: whoever is closest to
src/server.tsnext — this is twenty minutes and it makes the floor complete.