agentic-os/dashboard
Claude d149356a22 Fix critical WebSocket origin bypass, zombie processes, and review findings
Addresses findings from Devin and Codex reviews on the merged PR #10:

- CRITICAL: /ws/terminal accepted connections from any origin - Starlette's
  CORSMiddleware does not protect WebSocket handshakes, so any webpage could
  open a socket to the dashboard's terminal and get an interactive shell on
  the user's machine. Now validates the Origin header against the same
  allowed-origins list used for CORS before accepting.
- PtySession.close() sent SIGKILL to the shell's PID but never reaped it via
  os.waitpid(), leaking a zombie process per closed terminal session.
- hermes_available() ran a real subprocess (possibly bridged through WSL) on
  every /api/status poll, which the dashboard hits every 15s. Added a 60s
  TTL cache.
- create_skill() now also creates learnings.md and the context/ directory,
  matching the standard skill template (_template/) instead of only
  writing SKILL.md.
- The '+ New Skill' button stayed visible in the Skills Hub detail view
  since only its sibling filter input was hidden; both now live under a
  shared #skillActions container that's hidden/shown together.

Verified: malicious/missing-origin WebSocket connections are rejected at
the handshake (HTTP 403) before any shell spawns; a valid dashboard origin
still connects and works; closing a session leaves no zombie/orphaned
process; the hermes availability cache avoids repeat subprocess spawns.
2026-07-09 00:07:17 +00:00
..
pages Fix critical WebSocket origin bypass, zombie processes, and review findings 2026-07-09 00:07:17 +00:00
api.js Make Skills Hub context files editable and add skill creation 2026-07-07 17:22:41 +00:00
app.js Security & polish: untrack settings.json, fix CORS, remove broken og:image, replace console.error with toast 2026-05-18 01:32:24 +05:30
index.html Add a Terminal page to the dashboard 2026-07-05 22:15:47 +00:00
styles.css Replace command-runner Terminal with a real interactive PTY 2026-07-06 05:12:54 +00:00
utils.js Add a Terminal page to the dashboard 2026-07-05 22:15:47 +00:00