Files
hermes-agent/hermes_cli
unsupportedpastels 3e33ec2a9d fix(webapp): keep loopback Webapp launch-link-only and refuse cookie logins
Addresses the security blocker on PR https://github.com/NousResearch/hermes-agent/pull/160226
(issue https://github.com/NousResearch/hermes-agent/issues/159500):
RFC 6265 §8.5 does not isolate cookies on 127.0.0.1 by port, so accepting
browser login cookies on a loopback Webapp allows any other local port the
browser visits to capture and replay those cookies against REST and
/api/webapp/socket-ticket?socket=host-terminal, bypassing withhold_session_token.

Pivot to Direction 1 (launch-link-only on loopback Webapp):
- Restore middleware, web_server, webapp_sign_in, web_server_dashboard,
  web_routers/{webapp,status,files}, web_server_file_tickets, and
  apps/desktop/src/lib/{platform,browser-transport}.ts (removing
  browser-loopback-login.test.ts) back to base 3113542d64 so loopback
  Webapp never treats cookies as a credential.
- On private_launch(app.state), render a launch-link-only notice on
  GET /login directing the user to run `hermes webapp` (no login form,
  no provider buttons, no Set-Cookie), return {"providers": []} on
  GET /api/auth/providers, and refuse browser cookie sign-in on
  GET /auth/login, GET /auth/callback, and POST /auth/password-login
  with HTTP 403 and `hermes webapp` guidance while preserving RFC 8252
  native flows, gated non-loopback login, launch-link tokens, and
  standalone loopback dashboards.
- Rewrite tests/hermes_cli/test_webapp_loopback_login.py to verify
  Direction 1 and RFC 6265 §8.5 cookie-replay rejection.
2026-11-26 00:57:21 -05:00
..
…
…
…
…
…
…
…
…
…
…