Repository navigation
Never take the official badge from an upstream registry row - #170
Conversation
RegistryServerSummary.official is documented as never trusted from the wire, but the Smithery adapter decodes its rows straight from Smithery's JSON and tag_source cleared only website_url and auth_kind. So with a Smithery key configured, a row arriving with "official": true kept the badge on every uncurated search: RegistrySearch and the guided SetupSearch, which both answer through McpRegistry::registry_search. Only RegistrySearchCurated with tag_official re-tagged it. - tag_source clears official, like the other trust signals. - registry_search clears it on every row from every source, so only registry_search_curated can set it, from the module's own list. The field still deserializes: hosts decode the badge the module sets from its replies, so #[serde(skip_deserializing)] would strip it there. Tests run each search path against loopback stand-ins for the official catalog and Smithery: plain search, and curated search with and without tagging. Two test-only seams let the ops tests point Smithery at a loopback server.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Tiny Sweeper reviewReviewed head: Verdict: Ready for maintainer review · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): Never take the official badge from an upstream registry row. The change stops the `official` badge from being taken from an upstream registry row: the Smithery adapter's `tag_source` clears `official` alongside the other untrusted fields, and `McpRegistry::registry_search` clears it on every row from every source, so only `registry_search_curated` can set the badge from the module's own curated list. The tests lane now reports no defect: it found the diff carries tests that would fail if either guard were removed, including the loopback Smithery tests in `ops/mod_tests.rs` and `tinybus_module/mod_tests.rs`. The latest-push delta is unavailable, so no push-delta comparison is presented. Review snapshot
Completeness: Complete What changed`tag_source` in the Smithery adapter now clears `official` like the other trust signals, and `McpRegistry::registry_search` clears `official` on every row returned by every source, so `RegistrySearch` and `SetupSearch` can no longer surface an upstream-claimed badge while `registry_search_curated` keeps badging exactly the curated servers. The field still deserializes so hosts can decode the badge the module sets in its replies. Test-only seams (`Registries::with_smithery_base`, `McpRegistry::with_registries`, `McpService::with_dynamic_registry`) point the module at loopback stand-ins. Features
Tests
FindingsNo active actionable findings. Before mergeNone. How this fits togetherflowchart LR
n0["...or_from_the_registry_steps_over_its_store<br/>changed"]:::changed
n1["McpRegistry<br/>changed"]:::changed
n2["SmitheryRegistry<br/>changed"]:::changed
n3["a_row_that_already_names_its_source_keeps_it<br/>changed"]:::changed
n4["Registries<br/>changed"]:::changed
n5["bare_summary"]:::impacted
n6["registry"]:::impacted
n7["clone"]:::impacted
n8["registry_over_catalog"]:::impacted
n9["registry_with"]:::impacted
n0 -->|calls| n6
n0 -->|uses| n6
n0 -->|tests| n6
n3 -->|calls| n5
n3 -->|tests| n5
n4 -->|uses| n2
n6 -->|uses| n1
n8 -->|uses| n1
n8 -->|calls| n7
n9 -->|uses| n1
n9 -->|calls| n6
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
# Conflicts: # crates/tinymcp/src/registry/ops/mod_tests.rs # crates/tinymcp/src/registry/ops/types.rs
Summary
RegistryServerSummary.officialis documented as "never trusted from the wire". But the Smithery adapter decodes its rows straight from Smithery's JSON, andtag_sourcecleared onlywebsite_urlandauth_kind. So with a Smithery key configured, a row arriving with"official": truekept the badge on every uncurated search. That coversRegistrySearchand the guidedSetupSearch, both of which answer throughMcpRegistry::registry_search. OnlyRegistrySearchCuratedwithtag_officialre-tagged it.tag_sourceclearsofficial, like the other trust signals.registry_searchclears it on every row from every source, so onlyregistry_search_curatedcan set it, from the module's own list.The field still deserializes. Hosts decode the badge the module sets in its replies (OpenHuman shows it from
RegistrySearchCurated), and#[serde(skip_deserializing)]would strip it there.Related issue
None filed. Found by reading the curation path.
API or behavior changes
No row from
RegistrySearchorSetupSearchis badged official.RegistrySearchCuratedwithtag_officialbadges exactly the curated servers, as before. No contract change.Validation
On our Linux CI runner (toolchain 1.99.1), on this branch from main e098e53:
cargo fmt --all -- --check: cleancargo clippy --locked --all-targets --all-features -- -D warnings: 0 errors (main: 0)cargo build --locked --all-targets --all-features: ok-p tinymcp registry::: 723 passed, 0 failed.cargo test --locked --all-features --workspace: 1575 passed, 7 failed. All 7 are timing flakes intinybus_module::directoriesandregistry::bootthat fail the same way on main in full-suite runs and pass alone; none touches the badge.!lookalike(&page).official);!tagged[0].official);tag_official: false;RegistrySearch ["notion",1,20].Tests
no_search_member_badges_a_row_that_claims_official_on_the_wiredrivesRegistrySearch,SetupSearch, andRegistrySearchCuratedwith tagging off and on, through the module service. It runs against loopback stand-ins for the official catalog and for Smithery, whose one row claims the badge.McpRegistry-level tests cover plain search and curated search.a_row_claiming_the_official_badge_arrives_without_itcovers the Smithery adapter'stag_source.Registries::with_smithery_base,McpRegistry::with_registries,McpService::with_dynamic_registry) point the module at the stand-ins.Documentation
Code comments at both clearing sites.
Checklist
#[allow(...)],#[ignore], or relaxed lints.envcontents in the diff or the description