Repository navigation
feat(core, service-messaging, service-automation, plugin-webhooks)!: webhook deliveries and the flow http node reach only public addresses unless the operator allowlists the target - #34284
Conversation
…ts off non-public addresses Claude-Session: https://claude.ai/code/session_017xRBcRQTKjEKNxvpzPCbbc Co-authored-by: Claude <noreply@anthropic.com>
…allowlisted targets Claude-Session: https://claude.ai/code/session_017xRBcRQTKjEKNxvpzPCbbc Co-authored-by: Claude <noreply@anthropic.com>
…listed targets Claude-Session: https://claude.ai/code/session_017xRBcRQTKjEKNxvpzPCbbc Co-authored-by: Claude <noreply@anthropic.com>
…outbound-request guard refuses Claude-Session: https://claude.ai/code/session_017xRBcRQTKjEKNxvpzPCbbc Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xRBcRQTKjEKNxvpzPCbbc Co-authored-by: Claude <noreply@anthropic.com>
…quest allowlist Claude-Session: https://claude.ai/code/session_017xRBcRQTKjEKNxvpzPCbbc Co-authored-by: Claude <noreply@anthropic.com>
…ebhooks-http-node
…ror-code ledger Claude-Session: https://claude.ai/code/session_017xRBcRQTKjEKNxvpzPCbbc Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xRBcRQTKjEKNxvpzPCbbc Co-authored-by: Claude <noreply@anthropic.com>
…ry prefix-matching core alias Claude-Session: https://claude.ai/code/session_017xRBcRQTKjEKNxvpzPCbbc Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 13 package(s): 28 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 11 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 189 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin c13c83793faf5d2c5ae2828423da17800b06a797 && git checkout c13c83793faf5d2c5ae2828423da17800b06a797
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d01f399e3b741c8e0d54b811b5d6e29551151509 dfef79b5ced76e092098e3fca5d20e1f48665503 && git checkout -B drift-repro d01f399e3b741c8e0d54b811b5d6e29551151509 && git merge --no-ff dfef79b5ced76e092098e3fca5d20e1f48665503
node scripts/docs-audit/affected-docs.mjs --json d01f399e3b741c8e0d54b811b5d6e29551151509
|
…ebhooks-http-node Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
…request rule they now ship The webhooks page described refusing non-public targets as future work; it now states the shipped rule: the default refusal, the allowlist and its grammar, that link-local and metadata addresses are never allowlistable, that every redirect hop and the connected address are judged, and that a refusal dead-letters as EGRESS_REFUSED. The flows page states the same rule where the http node is documented. Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
…its loopback receiver The suite dials a receiver on loopback through the real, guarded fetch; it allowlists that target through the environment the way an operator does, scoped to the suite, like the branch's other loopback suites. Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 0d81ccb · 2026-11-16T06:02Z |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: Read at 2026-11-16T06:11Z. First review of this head; claim: comment 6908738958; no lane request (owed per check-owed-reviews). Independence: implemented in a project thread for security#1; reviewed by os-tesla, who neither dispatched nor implemented it. No prior contract-review record exists for this PR, so no earlier finding id is continued; M1, S1 to S3 and N1 to N3 are all new on this head. ① Derived judgments
② Semver level
CI on this head: 69 check-runs, all completed, 60 success, 9 skipped, none failing or pending. The PR is open and mergeable-clean against ③ Boundary flags
④ Design judgmentThe narrowing makes real a refusal the platform owed and takes away, at the consumer, only what the declaration names: internal targets need an operator allowlist entry. The seam (one decision per connected address, with host, organization and source, fail-closed) is the right shape and mirrors the datasource connect policy. Against the rule as written, the head does not yet hold in four places. Mechanism-level detail for M1 and S1 is in the sealed notes only.
M1 and S1 to S3 are open. A delta read by this reviewer is owed on the next head. Implemented-by: VERDICT: FAIL |
… non-public address and every cloud metadata address - The never-allowlistable tier holds every cloud metadata address the rule names, in IPv4, IPv6 and every IPv6 form that carries an IPv4 member, including the RFC 6052 layouts under the local-use NAT64 prefix. - The default policy answers "only public addresses": every special-purpose range that is not globally reachable is refused, and so is any IPv6 address outside global unicast. - The judged addresses are dialled in turn, so a target that answers on only some of its addresses is still reached; every connected socket's remote address is judged again. - The shared default guard logs to each installer's own logger. - The boot census reads only id, url and organization, in ordered pages, up to a bound it reports; its method no longer splits another's jsdoc. - Rule sentences are scoped to webhook deliveries and the flow http node. Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
…cloud metadata tier The changeset, the environment-variable reference and the webhooks and flows pages state the rule the guard now enforces: only public addresses, every cloud metadata address never reachable, the judged addresses dialled in turn, and the rule scoped to webhook deliveries and the flow http node. Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
…dress, and the allowlist refuses one in any form - The never tier adds the Akamai (Linode) IPv6 metadata address, pinned refused by default and under a covering allowlist entry, beside a neighbouring address that entry opens. - A single-address allowlist entry is refused at boot whenever the connect would refuse it as never-allowlistable, in any form it carries. Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
…t an address list Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
…ebhooks-http-node Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
|
review#1 · os-mickey · session_01ASNY8Ywba8ySbMdWvra2vS Contract-review-claim: session_01ASNY8Ywba8ySbMdWvra2vS · head e022b2d · 2026-11-16T08:58Z |
|
review#1 · os-mickey · session_01ASNY8Ywba8ySbMdWvra2vS Contract reviewServed-tier: Second record on this PR; the first (comment 6908879722) was a FAIL on an earlier head. This head is judged in full. Independence: this session neither dispatched nor implemented the diff. Findings are stated at rule level; specifics are in the sealed notes only. ① Derived judgments
② Semver level
Check-runs on this head: all completed, each success or skipped, none failing or pending. The PR is open and mergeable-clean. ③ Boundary flags
④ Design judgmentThe ledger change holds against its consumers: two additive codes under the owning package, carried by the two error classes the comment cites, neither on a wire envelope. The seam (one decision per connected address with host, organization and source; a throw is a refusal; a malformed or over-broad allowlist fails the boot in all three plugins; no unguarded fallback in the plugin wiring) is the right shape, and the narrowing takes away only what it declares, behind a followable operator opt-in. One part of the contract does not hold. M1: closed.
M2 is open. A delta read is owed on the next head. Implemented-by: VERDICT: FAIL |
…e outbound-request guard proves at install that it judges every request it sends, and refuses the boot and every send when it cannot - The guard sends with undici's own fetch and its connector, and proves at install that a request made that way reaches the connector; where it cannot, the install rejects (each plugin awaits it, so the boot fails) and every send is refused before anything leaves. A response that arrives over a connection the policy never judged is refused. - A policy that gives no verdict refuses, at either judgement. - A host name that does not resolve reads the same refusal text as a refused one, and stays retriable for a webhook delivery. - The dispatcher's test-only transport option is marked outside the rule. - Suites that faked the network with a stubbed global fetch now hand the http node a named stand-in, or deliver to an allowlisted loopback receiver: a stubbed global fetch no longer stands in for the guard. Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
…lowlisted loopback receiver The outbound-request guard judges every connection itself, so a stubbed global fetch no longer stands in for the network: the harness points each http node's url at a receiver on loopback and allowlists it through the environment, the way an operator lists an internal target. Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
|
review#1 · os-mickey · session_01ASNY8Ywba8ySbMdWvra2vS Contract-review-claim: session_01ASNY8Ywba8ySbMdWvra2vS · head dfef79b · 2026-11-16T13:29Z |
|
review#1 · os-mickey · session_01ASNY8Ywba8ySbMdWvra2vS Contract reviewServed-tier: Third record on this PR; delta after the FAIL in comment 6912107145 on ① Derived judgments
② Semver level
Check-runs on this head: all completed, each success or skipped, none failing or pending. The PR is open. ③ Boundary flags
④ Design judgmentThe remedy chosen for M2 is the stronger of the two asked: enforcement is made independent of the host property and is also proven at install, with a per-send check behind it. The proof exercises the path the sends take, cannot be satisfied by a transport that skips the connector, and fails closed at boot and at every send. The ledger change still holds against its consumers as two additive codes; its prose for one of them is now behind the tree. M2: closed.
S4 and N8 to N10 are open and do not block. Implemented-by: VERDICT: PASS |
|
security#1 · sunhaolin · session_017xRBcT1w3zpekijraHJE4f 席位核对ACCEPT at
Implemented-by: os-dev (security#1 order, |
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — no published skill teaches a webhook or flow
httpnode target on an internal address; the rule and its setting are stated in the changeset and the webhooks docs.维护者速读
http节点的出站请求,现在只能到达公网地址;要访问本机或内网目标,运维需在OS_EGRESS_ALLOWED_TARGETS里明确列出;链路本地与云元数据地址无论如何都不能放行。OS_EGRESS_ALLOWED_TARGETS);发往公网目标不受影响。允许列表写错会让启动失败并列出每条错误项。回滚即还原本 PR。packages/core/src/egress/(策略、地址分类、受保护的 fetch),packages/services/service-messaging的 HTTP 投递默认 fetch,packages/services/service-automation的http节点内联分支。pnpm --filter @objectstack/core exec vitest run src/egress,预期 170 个测试全绿。What changes
Rule. An outbound request whose target a tenant can author reaches only public addresses unless the operator's allowlist names the target. Link-local and cloud metadata addresses are never reachable. The rule is judged on the address the connection is actually made to.
@objectstack/core/egress(new subpath entry):EgressPolicy: the seam, decided per connected address, host name, organization and source.createEnvEgressPolicy: the open-core default. It admits only globally reachable addresses: every special-purpose range that is not globally reachable is refused (loopback, private (RFC 1918), carrier-grade NAT, link-local,0/8,::, multicast, broadcast and reserved, unique-local, local-use NAT64 and the rest), as is any IPv6 address outside2000::/3. IPv6 forms that carry an IPv4 address (mapped, SIIT, NAT64, 6to4, compat, Teredo) are judged as the IPv4 address they carry.OS_EGRESS_ALLOWED_TARGETS: exact host names, IP addresses or CIDR blocks, comma-separated, with a strict grammar. A malformed or over-broad entry, or a link-local or metadata address, fails the boot and names every bad entry.EGRESS_REFUSEDand is never retried.httpnode: the inline arm goes through the guard by a new seam (service-automation). A refusal answershttp: EGRESS_REFUSED: ….egressPolicyoption.sys_webhookrows the guard will refuse.EGRESS_REFUSEDandEGRESS_ALLOWLIST_INVALIDunder@objectstack/core.OS_EGRESS_ALLOWED_TARGETSthrough their environment; suites that stubbed the global fetch use a named stand-in (stubbed-fetch-egress.testkit.ts) or an allowlisted loopback receiver. There is noNODE_ENVbranch. The dispatcher'sfetchImploption is test-only and outside the rule.Tests
packages/core/src/egress/egress-policy.test.tsandguarded-fetch.test.ts: 170 cases covering address classes, embedded-IPv4 forms, allowlist grammar and boot refusal, connect-time judgement and re-judgement, dial-in-turn, the install-time proof, redirect hops and literal IPs.service-messagingsrc/http-egress-guard.test.ts: 10 cases (refused target dead-letters once, never retried; public target delivered).service-automationsrc/builtin/http-node-egress-guard.test.ts: 10 cases (inline arm refused, allowlisted target reached).plugin-webhookssrc/webhook-egress-census.test.ts: 8 cases (the boot census of stored rows).Acceptance notes
httpnode.resilientFetch), the OAuth grant fetches, MCP, embedders and push delivery.Verification
Readings at head
dfef79b5ced76e092098e3fca5d20e1f48665503(implementer, under the verify lock).dfef79b5changes only the showcase flow test harness relative toa30e3efc6a, where the package suites and ablations were read.Pins, package suites, ablations, gates and the dogfood battery
a30e3efc6a): core egress 170/170, service-messaginghttp-egress-guard10/10 andhttp-sender-bodyless19/19, service-automationhttp-node-egress-guard10/10, plugin-webhooks census 8/8.a30e3efc6a): core 3574/3574, service-messaging 1001/1001, service-automation 4050/4050, plugin-webhooks 322/322, spec 27025 passed + 1 todo. Typecheck of all five: exit 0.@objectstack/example-showcase(atdfef79b5): 545/545. The showcase fan-out pair red ata30e3efc6a(2 failed, 25 passed) is green atdfef79b5(27/27): its harness now dials an allowlisted loopback receiver instead of stubbing the global fetch.scripts/ablation-replace.mjs, each anchor hit, each leg red, each restored (blob == HEAD,git diff HEADempty): the never tier (5 legs), the public-only classification (4), dial-in-turn, the socket re-judgement, the per-installer logger, the census projection and bound (2), the install-time proof (3), the named refusal on a missing verdict, and the unresolved-host text and retry (2).dispatch-gates --commands∪--ranatdfef79b5: 145 derived, 145 run, 0 NOT-MEASURED, 0 UNRUN.check-platform-checklist --changed-from origin/main: 20 anchors judged, 0 lost.pnpm --filter @objectstack/dogfood test, no shard, no path) atdfef79b5: Test Files 473 passed | 3 skipped (476), Tests 4003 passed | 42 skipped (4045), no failures.dfef79b5: 69 check-runs, 60 success, 9 skipped, 0 failing.🤖 Generated with Claude Code
https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f