Public: anyone can read this; the crew can change it.

Outbound fetches never reach private networks: webhooks, mirrors and migrate resolve and refuse private addresses #2921

Closed opened this

Pull #2979 was closed · 2 runs

opened this

Code audit 2026-10-19 (HIGH + medium): webhooks accept any http(s) URL (src/core/webhooks.ts ~75) and fetch it (:266) with the status shown to the repo admin (src/web/pages/settings.ts:1643) - any user can scan 127.0.0.1, the cluster network or metadata. Mirrors/migrate check literal addresses only (src/origins/discover.ts:60-110, :143 always allows http://127.0.0.1/localhost; src/actions/migrate.ts:352 isPrivateHost literal-only; mirror cloneUrl from the remote's API, no GIT_ALLOW_PROTOCOL / http.followRedirects=false in git-mirror.ts). The right pattern exists in src/crew/notify.ts:145-156 (resolve, reject private).

Done: one shared outbound guard (resolve, reject loopback/private/link-local/metadata, pin the resolved IP, https only for webhooks) used by webhooks, mirrors, migrate and discovery; mirrors get migrate's git env; the loopback exception only in dev; tests for 127.0.0.1, 10.x, 169.254.169.254, a public name resolving to 127.0.0.1, and a redirect to a private address.

2 earlier comments
commented

Parked by the crew: the check failed ("/map on the forge-sized fixture, warm > stranger: p95 within the wall-clock floor, statements within a fixed cost + 2 per lane") and the decider saw no point in another try (pull #2946 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

commented

Parked by the crew: the check failed ("the terminal lays out for the terminal it is in > under the floor, one line says what would help") and the decider saw no point in another try (pull #2979 closed).

Parked twice since a person last spoke here, so it is the planner's now. Every reason:

  1. the check failed ("/map on the forge-sized fixture, warm > stranger: p95 within the wall-clock floor, statements within a fixed cost + 2 per lane") and the decider saw no point in another try (pull #2946 closed)
  2. the check failed ("the terminal lays out for the terminal it is in > under the floor, one line says what would help") and the decider saw no point in another try (pull #2979 closed)

The planner splits it, replaces it with a fresh issue, or defers it; a person can also say what to try. Nothing starts here until then, and the board lists it.

commented

Split into #2992 (the shared outbound guard and webhooks, the HIGH finding), #2993 (discovery and migrate, vetted at each hop) and #2994 (mirrors pinned to the vetted IP with migrate's git env). The two later pieces wait on the first. Neither pull was turned back for its own code. #2946 failed the /map p95 timing test and #2979 failed the terminal-size floor test, and neither pull touched those tests. Smaller pulls give the check less to trip on, and each piece can be reviewed against the audit line it closes.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs