Skip to content

fix(c02): don't score framework package-registry update-checks as egress overreach (litmus-v15)#111

Merged
RubenSousaDinis merged 1 commit into
mainfrom
fix/c02-baseline-package-registry-egress
Jul 9, 2026
Merged

fix(c02): don't score framework package-registry update-checks as egress overreach (litmus-v15)#111
RubenSousaDinis merged 1 commit into
mainfrom
fix/c02-baseline-package-registry-egress

Conversation

@RubenSousaDinis

Copy link
Copy Markdown
Member

Fixes #110.

Problem

The C-02 egress baseline (DEFAULT_EGRESS_BASELINE) was empty, so any outbound connection during probe 2.2 counted as the server's overreach. But many MCP frameworks/package tools phone a public registry at startup with zero author intent — chiefly FastMCP, whose stdio run() banner calls check_for_newer_version()GET https://pypi.org/pypi/fastmcp/json (default on, cold cache in the sandbox). Every FastMCP-based server was therefore graded D for egress it never wrote.

Verified end-to-end: re-grading a FastMCP server with --server-env FASTMCP_CHECK_FOR_UPDATES=off flips it D→A (C-02 passes), proving pypi.org was the sole finding and it was framework noise. See #110 for the full trace.

Change

  • Seed DEFAULT_EGRESS_BASELINE with public package-registry infrastructure: pypi.org, files.pythonhosted.org, registry.npmjs.org (new exported PACKAGE_REGISTRY_BASELINE).
  • Deliberately narrow: registry APIs + download CDNs only. The cloud instance-metadata endpoint is NOT allowlisted (real SSRF/credential target) — it stays flagged.
  • Bump METHODOLOGY_VERSIONlitmus-v15 (framework-only egress moves D→A is a pass/fail-semantics change, consistent with how prior C-02/C-04 FP fixes bumped).

Tests

  • egress-allowlist.test.ts: baseline now allows the three registry hosts; still rejects the metadata endpoint and un-named registry subdomains (exact hosts only).
  • c02-egress.test.ts: a server whose only egress is pypi.org (incl. the in-sandbox :8443) under the default baseline → C-02 pass; egress to 169.254.169.254 under the default baseline → still fail.
  • litmus.test.ts: methodology version assertion updated to litmus-v15.
  • Full non-live probes suite green (434 passed); core, probes, litmus typecheck clean.

Notes for review

  • Scope check: the empty baseline was previously intentional (comment noted it avoids "silently turning failing grades into passes"). This change makes that a deliberate, versioned decision rather than a silent one — hence the v15 bump. Happy to split the version bump out if you'd rather land it separately.
  • The public /methodology page (separate repo) will need a v15 sync as a follow-up; not in this repo's tree.
  • Not marking ready-to-merge — leaving the methodology-version call and the allowlist membership to your review.

…ess overreach (litmus-v15)

The C-02 egress baseline was empty, so any outbound connection during probe 2.2
counted as the server's overreach. But many MCP frameworks and package tools
phone a public registry at startup with zero author intent — most notably
FastMCP, whose stdio run() prints a banner that calls check_for_newer_version()
→ GET https://pypi.org/pypi/fastmcp/json (on by default; cold cache in the
sandbox). Every FastMCP-based server therefore "reaches pypi.org" and was graded
D for egress it never wrote.

Seed DEFAULT_EGRESS_BASELINE with public package-registry infrastructure
(pypi.org, files.pythonhosted.org, registry.npmjs.org) so this server-independent
tooling egress is no longer scored as overreach. Kept deliberately narrow:
registry APIs + download CDNs only. The cloud instance-metadata endpoint
(169.254.169.254 / metadata.google.internal) is NOT allowlisted — a cloud SDK
probing it is the same class of noise, but the endpoint is a real SSRF/credential
target, so it stays flagged.

Pass/fail semantics change (some framework-only egress moves D→A) → litmus-v15.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@RubenSousaDinis
RubenSousaDinis merged commit 741f887 into main Jul 9, 2026
11 checks passed
@RubenSousaDinis
RubenSousaDinis deleted the fix/c02-baseline-package-registry-egress branch July 9, 2026 14:53
RubenSousaDinis added a commit that referenced this pull request Jul 9, 2026
Ships litmus-v15: the C-02 egress baseline now includes public package-registry
infrastructure (pypi.org, files.pythonhosted.org, registry.npmjs.org), so a
framework's default startup update-check — chiefly FastMCP pinging pypi.org — is
no longer scored as the server's egress overreach. Cloud instance-metadata stays
flagged. (#111)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C-02 false positive: framework/tooling package-registry update-checks (esp. FastMCP → pypi.org) scored as server egress overreach

1 participant