Skip to content

security: three residuals NEXT.md doesn't cover yet, before Phase 1 #136

Open

Description

@m-vawter

Goal

Before Phase 1 starts, I checked the hackathon security concerns against main and NEXT.md. Phase 1 closes the big one: once 1.2 and 1.4 land, apps can't read the shell's localStorage, and #135 now tests exactly that. Three items don't have a step yet:

  1. SSRF through /api/chat's baseUrl. The custom provider passes any client-supplied baseUrl to createOpenAI, and the OpenAI and DeepSeek paths accept one too (server/api/chat.post.ts lines 48, 64 and 70). So the server will POST to any host a caller names, private and metadata addresses included. 3.3's blocklist ("never one without the other") is scoped to /api/proxy. Could the same check cover the chat route, or would an allowlist of known provider hosts plus a resolved-IP check for custom be better? I can add an expected-fail spec for it, like test: Phase 1 exit check as an expected-fail e2e spec #135, if that helps.
  2. /api/chat is open: no auth, no rate limit. Since 0.2 there's no server key to drain, so the worst case is smaller, but it's still an anonymous relay. Is a network-exposed deployment in scope, or is the target localhost and self-hosting behind the host's own auth? NEXT.md's goal could be read either way, and the answer decides whether this needs a step.
  3. VFS writes fail silently. writeFile catches a failed setItem and only logs it, so the registry's persist() never sees the error, and an install can half-write when storage is full. listFiles also matches apps/todo against apps/todo-list/…. 1.1 rewrites this interface anyway, so adding "writes reject on failure; an install is all-or-nothing; listing matches whole path segments" to 1.1's Done-when costs little now.

@r0073d-l053r @Sullux, these are yours (security review, and server/api/** and vfs.ts). @xcjs, while they're away, your call as tiebreaker.

Done when

  • SSRF via the chat route's baseUrl: a step, a Done-when line, or out of scope, recorded
  • an open /api/chat: deployment scope decided and recorded
  • silent VFS write failures: in 1.1's Done-when, or a decision recorded

Files

NEXT.md

Depends on

(none)

Notes

(created by claude-code for @m-vawter at 2026-10-23T22:40:31Z)

Activity

  1. added
    ws:docsDocs and process - ADRs, README, playbooks, tests
    p1Important, not on the critical path
    type:decisionA choice the team must make (may become an ADR)
    on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    p1Important, not on the critical pathstatus:unclaimedNobody owns this yet - claim ittype:decisionA choice the team must make (may become an ADR)ws:docsDocs and process - ADRs, README, playbooks, tests

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions