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
Krini sends no security response headers: no Content Security Policy, no frame-ancestors or X-Frame-Options, no X-Content-Type-Options, no Referrer-Policy and no HSTS. It still sends X-Powered-By: Next.js.
This matters because any script that runs in Krini's origin can read the user's access token from GET /auth/api/token, and that token is accepted by every registered TES and WES service. The code editor of @elixir-cloud/design (Ace) also loads its syntax-check workers at runtime from cdn.jsdelivr.net, so a compromised CDN path would run code with access to the token. Clickjacking of "Copy access token" or "Logout" is possible as well.
Found in the pre-release review of 0.1.0 (finding M2).
Proposed fix
A Content Security Policy with a per-request nonce for scripts (script-src 'nonce-…' 'strict-dynamic'), frame-ancestors 'none', object-src 'none', base-uri 'self', form-action 'self' and connect-src 'self' https: (the TES and WES origins come from the registry at runtime).
Self-host Ace's workers, so that no script comes from a CDN.
X-Frame-Options: DENY, X-Content-Type-Options: nosniff, Referrer-Policy: strict-origin-when-cross-origin and HSTS; poweredByHeader: false.
The image also ships NOTICE next to LICENSE (finding L15, a one-line Dockerfile change).
An end-to-end test of the headers, and that the app runs without CSP violations; docs in docs/operator-guide/deployment.md.
Activity
docs: cover the pre-release fixes in the notes