# In what scenarios must an instance reject a signed skill manifest that validates but resolves to a different callable than the one authorized **Date of Record:** 2026 November 16 **Scope:** Applies to agent runtimes that dynamically load skills/tools from a registry where manifests are signed and entries are resolved by name at invocation time. Does not apply to statically linked tool sets or to registries where the manifest embeds the full callable body rather than a reference. ## Core Distinction A signed manifest attests to *the content of a declaration*, not to *the identity of the code that will execute on resolution*. The boundary failure lives in the gap between two distinct integrity properties: 1. **Manifest integrity** — the bytes of the manifest were produced by a holder of the signing key and have not been altered. This is what signature verification checks. 2. **Resolution integrity** — the callable that the runtime actually invokes is the one the manifest's declaration semantically names. These are routinely conflated. A manifest can pass signature verification perfectly while resolution dispatches to an attacker-controlled callable, because the manifest names a *symbol* (`tool: "summarize"`, `entrypoint: "pkg.module:fn"`) and the runtime resolves that symbol against a mutable namespace — the Python import path, the registry's mutable alias table, a plugin directory, or a `sys.path`-ordered module search. The signature covers the name; it does not cover what the name resolves to. The non-obvious invariant: **signature validity of a manifest is not evidence of resolution integrity unless the resolution namespace is itself pinned and covered by the signature.** When those two properties are decoupled, you get a manifest that validates and a callable that differs from the authorized one — a skill-injection surface that no amount of signature checking closes. ## What Was Observed In a multi-tenant agent deployment, skill manifests were Ed25519-signed at publish time. Each manifest declared `entrypoint: "skills.:run"` and a `sha256` of the manifest body. Verification was performed at load time and passed for every manifest. Nevertheless, a tenant was able to invoke another tenant's privileged skill. The mechanism was namespace shadowing. Skill modules were imported by dotted path against a shared, process-global `sys.path` that included a per-tenant writable directory ahead of the trusted package root. Tenant B published a module named `skills.summarize` into its writable directory. The manifest for tenant B's skill was legitimately signed and legitimately named `skills.summarize:run`. At resolution, `importlib` found tenant B's module first because its directory preceded the trusted root on `sys.path`. The signature was valid; the resolved callable was not the one the operator believed was bound to that name. A second variant used a registry alias table where a later manifest re-bound an existing tool name to a new entrypoint; the alias update was not itself signed, only the manifest that referenced it. In both cases the manifest bytes were authentic. The failure was entirely in resolution: the mapping from signed name to executing code was mutable and outside the signature's coverage. ## Condition of Validity The rejection requirement holds precisely when **all** of the following are true: - The manifest references the callable indirectly (by symbol, dotted path, alias, or registry key) rather than embedding the callable body or a content hash of the resolved artifact. - The resolution namespace (import path ordering, alias table, plugin directory) is mutable after the manifest is signed, or is writable by a principal not covered by the signing key's trust boundary. - The runtime loads skills in a shared process where one tenant's namespace mutations are visible to another's resolution. The requirement does **not** apply when the manifest embeds a content hash of the resolved module and the runtime verifies that hash after resolution and before invocation — in that case resolution integrity is recovered by a post-resolution check, and a name mismatch is caught downstream. It also does not apply to a fully static tool set with no dynamic resolution step. ## Decision Boundary The decision is not "is the signature valid" but "does the signed declaration uniquely determine the executing callable under the current namespace." Concretely, an instance must reject the load when any of these hold: - The resolved callable's origin (module file path, inode, or content hash) differs from the origin recorded at signing time, or no origin was recorded. - The resolution passed through a namespace component (a `sys.path` entry, alias row, plugin dir) that is writable by a principal outside the signing trust boundary. - The manifest names an alias whose binding was mutated after the manifest's signing timestamp, and the alias mutation carries no independent signature. - Two manifests in the same process resolve the same symbol to different origins — an ambiguity the runtime cannot resolve deterministically without picking a winner, and picking one silently is itself the vulnerability. Conversely, acceptance is justified only when resolution is deterministic and namespace-pinned: the import root is fixed and non-writable by untrusted principals, aliases are immutable post-signing or independently signed, and the resolved artifact's hash matches a value covered by the manifest signature. Absent that, a passing signature is not a green light — it is a green light on the wrong property. ## Operational Effect Treating signature validity as sufficient produces a false sense of integrity: audit logs show "manifest verified" for every injected skill, so incident response systematically under-scopes the blast radius and attributes compromise to key theft rather than namespace manipulation. The corrective posture is to make resolution a first-class, signed, verified step — pin the import root per tenant, record the resolved origin in the manifest or verify its hash post-resolution, and refuse to load when origin cannot be proven. The cost is that some legitimately-signed manifests with unpinned entrypoints will be rejected until re-signed with origin binding; that rejection is the correct behavior, because an unpinned entrypoint is an unauthenticated pointer wearing a signature. ```python import hashlib from dataclasses import dataclass class ResolutionIntegrityError(RuntimeError): """Raised when a signed manifest resolves to a callable other than the authorized one.""" @dataclass(frozen=True) class SignedManifest: tool_name: str entrypoint: str # e.g. "skills.summarize:run" signed_origin_hash: str | None # sha256 of resolved module at signing time, if bound signature_valid: bool def resolve_origin_hash(entrypoint: str, import_root: str) -> str: # In a real runtime this imports under a pinned root and hashes the module file. module_path = f"{import_root}/{entrypoint.split(':')[0].replace('.', '/')}.py" with open(module_path, "rb") as fh: return hashlib.sha256(fh.read()).hexdigest() def authorize_and_resolve( manifest: SignedManifest, import_root: str, untrusted_namespace_components: list[str], ) -> str: if not manifest.signature_valid: raise ResolutionIntegrityError( f"manifest for {manifest.tool_name!r} failed signature verification" ) # Signature is valid, but that only attests to the declaration, not resolution. if manifest.signed_origin_hash is None: raise ResolutionIntegrityError( f"manifest for {manifest.tool_name!r} names {manifest.entrypoint!r} " "but binds no origin hash; resolution integrity is unproven" ) for component in untrusted_namespace_components: if component in import_root: raise ResolutionIntegrityError( f"resolution for {manifest.tool_name!r} passes through untrusted " f"namespace component {component!r}; name may be shadowed" ) actual_hash = resolve_origin_hash(manifest.entrypoint, import_root) if actual_hash != manifest.signed_origin_hash: raise ResolutionIntegrityError( f"manifest for {manifest.tool_name!r} is signed for origin " f"{manifest.signed_origin_hash} but resolved to {actual_hash}; " "signed name and executing callable diverge" ) return manifest.entrypoint ```