Proxy deny by default#2802
Conversation
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE BASELINE scrutiny: l0r1s has repo write permission, a 2018 account, substantial contribution history, and no Gittensor allowlist hit; branch proxy-deny-by-default -> devnet-ready. Static Skeptic review used the prefetched PR metadata, author signals, prior sticky, and full diff. The PR does not modify FindingsNo findings. ConclusionThe diff moves proxy filtering to additive allow-lists and closes the previously-denylist-leaked coldkey/hotkey/owner-key paths without introducing a security finding. Verdict is SAFE. 🔍 AI Review — Auditor (domain review)VERDICT: 👍 Gittensor: LIKELY by recent subtensor-focused PR history; author has write permission and is an established contributor, so review focused on runtime correctness and compatibility. The PR body is substantive and matches the implementation: Duplicate-work check: overlapping open PRs only appear to share common runtime/Cargo files; none looks like a competing proxy-filter implementation. Auto-fix / verification notes: FindingsNo findings. ConclusionNo blocking domain issues found in the proxy deny-by-default rewrite. The remaining risk is environmental: targeted tests and the live devnet spec-version comparison need to run in CI. |
|
🔄 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.