HTTP hardening for the agent, dashboard and MCP: today CORS falls back to permissive when unconfigured, JWT validation runs before OPTIONS is handled (so preflight fails), and there are no CSP or framing headers.
What to change
Remove the permissive CORS fallback (api/server.rs:102-115); the allowlist is mandatory in production (MVP-0.1).
Handle OPTIONS before JWT validation — fix the layer order.
CSP on the agent and the dashboard.
X-Frame-Options: DENY on the dashboard and MCP.
Acceptance
An unconfigured CORS_ALLOWED_ORIGINS fails startup in production rather than allowing *.
A cross-origin preflight from an allowed origin succeeds without a token; from a disallowed origin it is refused.
CSP and framing headers are present on every response, checked by a test.
The dashboard still functions with CSP enabled (no inline-script regressions).
## Goal
HTTP hardening for the agent, dashboard and MCP: today CORS falls back to permissive when unconfigured, JWT validation runs before OPTIONS is handled (so preflight fails), and there are no CSP or framing headers.
## What to change
- Remove the permissive CORS fallback (`api/server.rs:102-115`); the allowlist is mandatory in production (MVP-0.1).
- Handle OPTIONS before JWT validation — fix the layer order.
- CSP on the agent and the dashboard.
- `X-Frame-Options: DENY` on the dashboard and MCP.
## Acceptance
- [ ] An unconfigured `CORS_ALLOWED_ORIGINS` fails startup in production rather than allowing `*`.
- [ ] A cross-origin preflight from an allowed origin succeeds without a token; from a disallowed origin it is refused.
- [ ] CSP and framing headers are present on every response, checked by a test.
- [ ] The dashboard still functions with CSP enabled (no inline-script regressions).
sharang
added this to the Production MVP milestone 2026-09-20 20:17:24 +00:00
Stage:pruefwerk-stage.breakpilot.com serves HSTS, X-Frame-Options, nosniff and Referrer-Policy from the proxy, but no Content-Security-Policy.
Dashboard binary: sends no security headers of its own, so everything depends on the proxy.
Agent API: sets them itself.
DAST will report this once its header checks run in every scan (#998).
Seen while dogfooding DAST (2026-11-14):
- **Stage:** `pruefwerk-stage.breakpilot.com` serves HSTS, X-Frame-Options, nosniff and Referrer-Policy from the proxy, but **no Content-Security-Policy**.
- **Dashboard binary:** sends no security headers of its own, so everything depends on the proxy.
- **Agent API:** sets them itself.
DAST will report this once its header checks run in every scan (#998).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Goal
HTTP hardening for the agent, dashboard and MCP: today CORS falls back to permissive when unconfigured, JWT validation runs before OPTIONS is handled (so preflight fails), and there are no CSP or framing headers.
What to change
api/server.rs:102-115); the allowlist is mandatory in production (MVP-0.1).X-Frame-Options: DENYon the dashboard and MCP.Acceptance
CORS_ALLOWED_ORIGINSfails startup in production rather than allowing*.Seen while dogfooding DAST (2026-11-14):
pruefwerk-stage.breakpilot.comserves HSTS, X-Frame-Options, nosniff and Referrer-Policy from the proxy, but no Content-Security-Policy.DAST will report this once its header checks run in every scan (#998).