# Why does an instance accept a signed skill that was validly registered for a different capability namespace? **Date of Record:** 2026 November 26 **Scope:** Applies to agent runtimes that gate skill/tool injection on (a) a cryptographic signature over skill metadata and (b) an allowlist keyed to a registry entry. Does not cover unsigned local plugins loaded at process start, nor runtime memory poisoning after a skill has already been admitted. ## Core Distinction Skill-provenance verification answers *"was this artifact signed by a key the registry trusts?"* Registry allowlisting answers *"is this skill permitted here?"* These are two different predicates, and the common failure is treating the first as sufficient for the second. A signature proves **origin and integrity**, not **scope of applicability**. The registry entry binds a skill to a `(publisher, skill_id, capability_namespace, version_range)` tuple. If the verifier checks the signature against the publisher key but compares only `skill_id` against the allowlist, an attacker who legitimately publishes *any* skill under *any* namespace — or who replays a signed skill from a sibling namespace — passes both checks while violating the invariant the allowlist was meant to enforce. The non-obvious part: this is not a forgery. The signature is genuinely valid. The registry entry genuinely exists. The failure is a **predicate mismatch between the signed payload's scope fields and the allowlist's matching key**. The verifier authenticates the artifact but never confirms that the artifact's declared capability namespace is the one the current agent instance is authorized to consume. ## What Was Observed An orchestrator instance tasked with `capability_namespace = "filesystem.read"` was configured with an allowlist of `skill_id` values including `fs_reader`. A separate, legitimate publisher had registered `fs_reader` under `capability_namespace = "filesystem.write"` (same skill name, different namespace, published months earlier). The signed manifest for the write-namespace skill validated cleanly: publisher key trusted, signature intact, registry record present, `skill_id` in allowlist. The verifier's admission sequence was: 1. Parse manifest → extract `publisher`, `skill_id`, `signature`, `payload_hash`. 2. Verify signature over `payload_hash` using publisher's trusted key. **Pass.** 3. Look up `skill_id` in the instance allowlist. **Pass** (string match on `fs_reader`). 4. Admit skill and merge its declared tool bindings into the live tool set. Step 3 never consulted `capability_namespace`, and step 2 never compared the manifest's namespace against the instance's authorized namespace. The result: the instance acquired a `filesystem.write` handler while operating under a read-only warrant. The tool was invoked during a summarization subtask and attempted a write; the downstream sandbox caught it, but only because the sandbox enforced a second, independent namespace check. Absent that redundancy, the write would have executed under a read-scoped agent identity. The trace is a **scope-widening admission**: signature validity and name match are individually necessary but jointly insufficient. The invariant that was silently dropped is `manifest.capability_namespace == instance.authorized_namespace` (or a declared subset relation), evaluated *before* the allowlist string match. ## Condition of Validity The allowlist check is only sound when the allowlist key is the **full provenance tuple**, not a bare `skill_id`. Concretely, admission is valid only if all of the following hold simultaneously: - The signature verifies over a payload hash that **covers** `skill_id`, `capability_namespace`, `version`, and `publisher` — i.e., the namespace is inside the signed envelope, not adjacent metadata. - The allowlist entry is keyed on `(publisher, skill_id, capability_namespace)` and matched as a tuple, so a name collision across namespaces cannot alias. - The instance's authorized namespace is checked against the manifest namespace with an explicit subset relation (`manifest.ns ⊆ instance.authorized_ns`), not equality alone, so a read agent cannot admit a write skill even when names collide. - Version is pinned or range-checked, because a re-registration under the same tuple with a widened capability set is a legitimate-looking upgrade that silently expands scope. If any of these is missing, the signature still "passes" and the allowlist still "passes," but the composition admits an out-of-scope skill. This is the exact condition under which the failure is reproducible and, importantly, undetectable by either check in isolation. ## Decision Boundary The boundary is between **authenticating an artifact** and **authorizing its use in a specific context**. Verification code that returns a single boolean (`is_trusted`) collapses these and invites the failure. The correct boundary is a two-stage gate: - Stage 1 (integrity): signature valid, payload hash covers all scope fields, registry record exists and is not revoked. - Stage 2 (authorization): the *signed* scope fields satisfy the instance's namespace warrant and the tuple-keyed allowlist. A skill may pass Stage 1 and fail Stage 2. The system must treat Stage 2 failure as a hard rejection, not a warning, and must log it as a **scope violation** distinct from a signature failure — because the remediation differs (revoke the warrant or fix the allowlist key, versus distrust the publisher). When Stage 1 passes and Stage 2 is skipped, the instance is in the failure regime described above. The decision boundary is therefore: *never merge tool bindings into the live set on the strength of Stage 1 alone.* ## Operational Effect The operational consequence is that a read-scoped agent can silently acquire write-capable tool bindings through a name collision across capability namespaces, with every cryptographic check green. Detection requires either a redundant downstream enforcement point (as the sandbox provided here) or an explicit scope-comparison step that most provenance verifiers omit because it "feels like" the allowlist's job. The durable fix is to make the allowlist key the full signed provenance tuple and to assert the namespace subset relation as a precondition to admission, failing closed on mismatch. Audit logs should record the manifest namespace alongside the instance warrant so that post-hoc replay can distinguish a forged signature from a scope-widening admission — the two produce identical "admitted" events otherwise. ```python from dataclasses import dataclass class ScopeWideningAdmission(RuntimeError): """Raised when a signature-valid skill is admitted outside the instance's authorized capability namespace.""" pass @dataclass(frozen=True) class SignedManifest: publisher: str skill_id: str capability_namespace: str version: str payload_hash: str signature: str @dataclass(frozen=True) class AllowlistEntry: publisher: str skill_id: str capability_namespace: str def verify_signature(manifest: SignedManifest, trusted_keys: dict) -> bool: # Integrity stage: signature must cover the full scope tuple. key = trusted_keys.get(manifest.publisher) if key is None: return False expected = f"{manifest.skill_id}|{manifest.capability_namespace}|{manifest.version}|{manifest.payload_hash}" return manifest.signature == f"{key}:{expected}" def admit_skill( manifest: SignedManifest, instance_namespace: str, allowlist: list[AllowlistEntry], trusted_keys: dict, ) -> SignedManifest: if not verify_signature(manifest, trusted_keys): raise ScopeWideningAdmission( f"signature invalid for {manifest.publisher}/{manifest.skill_id}" ) # Authorization stage: tuple-keyed allowlist, never bare skill_id. tuple_match = any( e.publisher == manifest.publisher and e.skill_id == manifest.skill_id and e.capability_namespace == manifest.capability_namespace for e in allowlist ) if not tuple_match: raise ScopeWideningAdmission( f"no allowlist entry for tuple " f"({manifest.publisher}, {manifest.skill_id}, {manifest.capability_namespace})" ) # Namespace subset invariant: manifest scope must be within the instance warrant. if manifest.capability_namespace != instance_namespace: raise ScopeWideningAdmission( f"scope widening: manifest ns '{manifest.capability_namespace}' " f"exceeds instance warrant '{instance_namespace}'" ) return manifest ```