Proxy deny by default#2802
Conversation
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE BASELINE scrutiny: l0r1s has repo write permission, a 2018 account, substantial prior contribution history, and no Gittensor allowlist hit; branch proxy-deny-by-default -> devnet-ready. Static review used the prefetched metadata, prior sticky, author signals, and PR diff only. The PR does not modify FindingsNo findings. ConclusionThe diff moves proxy filtering to additive allow-lists, keeps stable proxy indices and superset behavior, and tightens the broad-proxy coldkey/network-critical leaks without introducing a security finding. Verdict is SAFE. 🔍 AI Review — Auditor (domain review)VERDICT: 👍 Author has write permission and substantial prior Subtensor activity; no trusted gittensor allowlist hit, and no competing open PR appears to implement the same proxy-filter rewrite. The PR body is substantive and matches the implementation: proxy filtering is rebuilt as additive allow-lists, Duplicate-work check: overlapping open PRs share common runtime/Cargo files only; none appears to be a competing proxy-filter implementation. Verification notes: FindingsNo findings. ConclusionNo blocking domain issues found in the proxy deny-by-default rewrite. The remaining risk is environmental: CI still needs to run the targeted runtime tests and the live devnet spec-version comparison. |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
Proxy filters: deny-by-default, additive allow-lists
What
Reworks proxy call filtering from denylists (
allow everything except…) toadditive allow-lists (
deny unless explicitly granted). New extrinsics arenow denied by default until they are classified into a call group.
call_groups.rs— a flat inventory of call groups. Each pallet is onegroup, split only where a proxy needs a subset. A
call_filter_group!macrogenerates both the
Containsfilter and theCallFilterMetadataview from asingle declaration, so they cannot drift.
mod.rs— eachProxyTypeis an additive union of whole groups; the twoamount/nested-call proxies (
SmallTransfer,SudoUncheckedSetCode) aregenerated with
whereconstraints. Also exposes the runtime-API metadata,derived from the same groups.
owner-settable (
ensure_sn_owner_or_root) vs root-only (ensure_root), sothe
Ownerproxy no longer carries inert root-only grants.Behavior
Preserves
main's per-proxy permissions, with two intentional changes:omission are now denied for the broad proxies —
reset_coldkey_swap(NonTransfer/NonFungible/NonCritical), and
root_dissolve_network,schedule_swap_coldkey,swap_coldkey(NonCritical).SubnetLeaseBeneficiarynow grants the full owner-settable subnet-managementsurface (was a narrower hand-picked list).
ProxyTypeindices andis_supersetare unchanged (no storage migration).Tests
RuntimeCallmetadata exactly(
GetCallMetadata) — fails if any call is unclassified.subtractively; owner/lease boundaries; tightened-leak guards.
SmallTransferamount limits andSudoUncheckedSetCodenested-call matching, exercised through the filter.