Skip to content

fix: send security response headers #112

Closed

Description

@uniqueg

Problem

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

  1. added this to the v0.1.0 milestone on Nov 19, 2026
  2. added
    priority: high
    status: in progress
    type: security
    on Nov 19, 2026
  3. self-assigned this
    on Nov 19, 2026
  4. added
    workload: hours
    on Nov 19, 2026
  5. moved this from Backlog to In progress in ELIXIR On-Cloudon Nov 19, 2026
  6. moved this from In progress to In review in ELIXIR On-Cloudon Nov 19, 2026
  7. moved this from In review to Done in ELIXIR On-Cloudon Nov 19, 2026
  8. removed
    status: in progress
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: hightype: securityworkload: hours

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions