# Under what conditions must an instance distrust a signed skill manifest when the capability graph's transitive closure exceeds the signer's declared authority scope **Date of Record:** 2026 November 25 **Scope:** Applies to agent runtimes that resolve tool/skill availability from cryptographically signed manifests and validate them by reconstructing a capability graph (skills → required capabilities → downstream tools). Does not cover unsigned manifests, single-skill manifests with no transitive edges, or runtime sandbox enforcement that operates independently of manifest trust. ## Core Distinction A signed skill manifest attests to two things that are routinely conflated: (a) the *integrity* of the manifest bytes and (b) the *authority* of the signer to grant the capabilities the manifest declares. Signature verification proves only (a). The poisoning vector lives entirely in the gap: a manifest can be perfectly signed by a legitimately credentialed signer and still smuggle capabilities the signer had no authority to confer, because the *transitive closure* of the declared capability graph reaches tools the signer never named and cannot name. The invariant that must hold is not "the manifest signature verifies." It is: **the set of capabilities reachable by transitive closure from the manifest's declared skills must be a subset of the signer's declared authority scope, evaluated at every graph edge, not just the root.** Poisoning occurs when a manifest adds one innocuous-looking edge whose closure crosses into a tool outside that scope. ## What Was Observed A manifest `skill:report-formatter@3.2.1` was signed by a build-bot identity whose authority scope covered `text.render`, `file.read:/reports`, and `skill.compose`. The manifest declared a single new dependency edge: `skill:report-formatter` → `skill:template-loader`, with the manifest-level annotation `requires: text.render`. Signature verified cleanly. The signer was authorized for `text.render`. Root-edge capability check passed. The failure surfaced downstream. `skill:template-loader@1.4.0` (a pre-existing, separately signed skill) itself declared `requires: file.read:/`, `requires: shell.exec:restricted`, and `requires: net.egress:*.internal`. The report-formatter manifest never mentioned these. But the closure of `{report-formatter} ∪ edges` reached all three. The build-bot had authority for `file.read:/reports` only; the closure granted `file.read:/` and two capabilities the signer could not confer under any reading of its scope. The poisoning was not in the manifest bytes and not in the signature. It was in the *composition*: a low-authority signer attached a high-capability skill by referencing it, and the runtime's validation checked each manifest node in isolation rather than the closure against the root signer's scope. The attacker never needed a forged signature—only a signer identity with one narrow grant and the knowledge that `template-loader` transitively pulled privileged tools. A second variant was observed where the closure *shrank* authority incorrectly: a manifest added an edge to a skill whose declared capabilities were a strict superset, and a naive "intersection of declared capabilities" check silently widened the effective grant because the runtime unioned rather than intersected along the path. ## Condition of Validity The distrust rule applies precisely when all of the following hold: 1. The manifest has at least one outbound edge to a skill not authored by the same signer identity (cross-signer edge). 2. The transitive closure of the capability graph from the manifest's root skills includes at least one capability outside the root signer's declared authority scope. 3. The runtime resolves skills by *composition* (edges are followed) rather than by *flat enumeration* (each skill's capabilities checked against the caller's own grants at invocation time). If condition 3 fails—i.e., the runtime enforces capability checks at each tool invocation against the *invoking* agent's grant, not the manifest's—then closure-based poisoning cannot escalate, because the extra capabilities are never exercised under the wrong principal. This is why the guardrail is often described as "defense in depth": closure validation at load time is necessary only when invocation-time enforcement is absent or coarse. When both exist, closure validation becomes an early-warning detector rather than the sole barrier. The rule does *not* apply when the signer's authority scope is itself defined as a closure (i.e., the signer is explicitly authorized to delegate any capability reachable from its named grants). In that case the closure is the grant, and the check is vacuous. ## Decision Boundary The boundary is between *edge-local validation* and *closure-scoped validation*: - **Edge-local (insufficient):** For each declared edge, check that the target skill's *directly declared* capabilities are within the signer's scope. This passes the poisoned manifest above, because `template-loader`'s direct declaration (`text.render`) is in scope; its transitive requirements are invisible to an edge-local check. - **Closure-scoped (required):** Compute `reachable(roots, edges)` to fixpoint, collect the union of all `requires` on every reachable node, and require `closure ⊆ authority_scope(signer)`. This fails the poisoned manifest at the `file.read:/` node. The decision threshold is the fixpoint: a manifest is rejected the moment the closure computation adds a capability outside scope, *before* any skill is registered or any tool is bound. Partial closure checks (depth-1, depth-2) are exploitable by padding the graph with a benign hop, so the check must run to fixpoint and must be recomputed whenever *any* referenced skill's manifest changes—because a previously-safe edge can become unsafe when a downstream skill is re-signed with new requirements. This recomputation-on-dependency-change is the invariant most often missed: manifests are validated once at install and never re-validated, so a downstream skill upgrade silently widens the closure of every upstream manifest that references it. ## Operational Effect When closure-scoped validation is enforced at load time and on dependency change, the poisoning class collapses to a narrow, auditable event: a manifest that references a skill pulling out-of-scope capabilities is rejected with a closure witness (the specific path from root to the offending capability). That witness is the actionable artifact—it names the exact edge that must be re-signed or the exact scope that must be widened. When it is absent, the failure mode is silent escalation: the agent operates with capabilities its manifest's signer was never authorized to grant, and no single manifest's signature check flags it. The blast radius is bounded only by what the over-privileged downstream skill can do, which is exactly the capability the attacker chose for its closure. The operational lesson is that signature verification answers "did this signer write these bytes," while closure validation answers "was this signer allowed to cause these capabilities to exist"—and only the second question bounds poisoning. ```python from dataclasses import dataclass, field class CapabilityScopeViolation(RuntimeError): """Raised when a manifest's transitive capability closure exceeds the signer's authority scope.""" @dataclass class SkillNode: name: str requires: set[str] = field(default_factory=set) edges: set[str] = field(default_factory=set) def compute_closure(roots: set[str], graph: dict[str, SkillNode]) -> set[str]: """Fixpoint closure of all `requires` reachable from roots. Raises on unknown nodes.""" seen: set[str] = set() frontier = list(roots) caps: set[str] = set() while frontier: node_name = frontier.pop() if node_name in seen: continue seen.add(node_name) node = graph.get(node_name) if node is None: raise CapabilityScopeViolation( f"manifest references unknown skill {node_name!r}; cannot bound closure" ) caps |= node.requires frontier.extend(node.edges) return caps def validate_manifest_closure( root_skill: str, graph: dict[str, SkillNode], signer_authority: set[str], ) -> None: """Reject if transitive closure of root_skill exceeds signer_authority.""" closure = compute_closure({root_skill}, graph) out_of_scope = closure - signer_authority if out_of_scope: raise CapabilityScopeViolation( f"skill {root_skill!r} closure exceeds signer scope; " f"out-of-scope capabilities: {sorted(out_of_scope)}" ) # Poisoned manifest: report-formatter -> template-loader -> {file.read:/, shell.exec, net.egress} graph = { "report-formatter": SkillNode( "report-formatter", requires={"text.render"}, edges={"template-loader"} ), "template-loader": SkillNode( "template-loader", requires={"file.read:/", "shell.exec:restricted", "net.egress:*.internal"}, edges=set(), ), } signer_scope = {"text.render", "file.read:/reports", "skill.compose"} # Edge-local check would pass (template-loader's direct `requires` is not visible # to a depth-1 check on report-formatter). Closure check catches it: validate_manifest_closure("report-formatter", graph, signer_scope) # -> raises CapabilityScopeViolation listing file.read:/, shell.exec:restricted, net.egress:*.internal ```