# When must an instance refuse a cosigned skill manifest: the transitive-signature trust-boundary failure in third-party agent skill marketplaces **Date of Record:** 2026 November 22 **Scope:** Applies to agent runtimes that load executable skill manifests (tool schemas + prompts + side-effect declarations) from a marketplace where manifests are signed by the publisher and optionally *cosigned* by a marketplace auditor. Covers the load-time verification path only; does not cover post-load runtime monitoring, output filtering, or model-weight provenance. ## Core Distinction A signed manifest answers exactly one question: *did this key holder produce these bytes?* It does **not** answer *are these bytes safe to execute in my trust domain?* The failure mode documented here lives in the gap between those two questions. A marketplace that cosigns a publisher's manifest creates a *two-signature artifact* — publisher signature over the manifest body, auditor signature over (manifest body + publisher signature). The non-obvious invariant is that **the auditor's cosignature is a statement about the publisher's signature's validity, not about the manifest's content's admissibility in the consuming agent's domain.** Runtimes routinely conflate these. When verification code sees a valid auditor cosignature, it treats the manifest as "marketplace-vetted" and skips the *semantic* checks that the auditor never performed: capability scope against the consumer's own policy, side-effect declarations against the consumer's sandbox, and — critically — the *transitive* set of skills the manifest invokes. The auditor validated a signature over a manifest that references *other* manifests. Those references are inside the signed body but are resolved *after* signature verification, and nothing binds the resolved transitive closure to any signature the auditor ever saw. ## What Was Observed A runtime (`agent-runtime v4.x`, marketplace `skills-hub`) loaded a manifest `pdf-extract@2.3.1`. Verification sequence: 1. Fetch manifest body `M` and publisher signature `S_pub = Sign(pub_key, H(M))`. 2. Fetch auditor cosignature `S_aud = Sign(aud_key, H(M || S_pub))`. 3. Verify both. Both pass. Runtime marks manifest `TRUSTED_COSIGNED`. 4. Parse `M.dependencies` → `[ "shell-exec@1.0.0", "net-fetch@0.9.2" ]`. 5. Resolve each dependency by name+range from the marketplace, verify *their* signatures independently, load. Step 5 is the boundary. The dependency resolution is **name-and-version-range based, not hash-pinned**. The auditor cosigned `M`, which contained `shell-exec: ^1.0.0`. At cosign time, `shell-exec@1.0.0` was benign. Twelve days later, `shell-exec@1.0.7` was published — same publisher key, validly signed, semver-compatible — and contained a widened side-effect declaration (`fs.write: ["/**"]` instead of `["/tmp/**"]`). The parent manifest's cosignature still verified because `M` had not changed. The runtime loaded `shell-exec@1.0.7` under the *parent's* `TRUSTED_COSIGNED` taint, and the child's own signature check passed because the publisher key was legitimate. The auditor never saw `1.0.7`. Observed trace (abbreviated): ``` load(pdf-extract@2.3.1) verify(M) -> OK (pub_key) verify(M||S_pub) -> OK (aud_key) taint = TRUSTED_COSIGNED resolve(shell-exec ^1.0.0) -> shell-exec@1.0.7 # NOT what auditor saw verify(child.M) -> OK (pub_key) # same key, new bytes taint(child) = TRUSTED_COSIGNED # inherited, never re-derived exec(shell-exec@1.0.7) -> fs.write("/etc/agent/policy.yaml") # allowed by child's own declaration ``` The write succeeded because the child's *own* signed side-effect declaration authorized it. Every signature in the chain was valid. The failure is not a signature forgery; it is a **taint-laundering** failure: a cosignature earned by one byte-string was silently extended to a different byte-string that the cosigner never evaluated. ## Condition of Validity The cosignature-as-admissibility shortcut is valid **only if** the manifest's dependency references are hash-pinned to the exact artifacts the auditor evaluated, *and* the auditor's cosignature covers the resolved closure. Formally, the runtime may propagate `TRUSTED_COSIGNED` from parent to child iff: - `M.dependencies` entries carry `{name, version, sha256}` (not `^range`), and - the child artifact's `sha256` equals the pinned value, and - the auditor cosignature was over a structure that commits to the closure hash (e.g., `H(M || S_pub || H(closure))`). If any of these fails, the child must be verified on its own merits against the *consumer's* policy — signature validity is necessary but not sufficient. The moment a runtime resolves a `^` or `~` range, or a floating tag like `latest`, under an inherited cosign taint, the invariant is broken and the boundary is crossed. ## Decision Boundary The decision the runtime must make at load time is not "is this signed?" but "**is the artifact I am about to execute the same artifact the cosigner evaluated?**" Three outcomes: - **Pinned + hash matches + closure committed in cosignature** → propagate `TRUSTED_COSIGNED`. Admissible without re-derivation. - **Pinned + hash matches + closure NOT in cosignature** → downgrade to `SIGNED_UNVETTED`. Admissible only if the consumer's policy independently clears the child's side-effect declaration. The cosignature is treated as publisher-identity evidence, not admissibility evidence. - **Unpinned (range/tag) OR hash mismatch** → refuse to inherit taint. The child is `SIGNED_UNVETTED` at best; if the resolved hash differs from any hash the auditor is known to have cosigned, treat as `UNVETTED_MUTABLE` and require explicit consumer opt-in per load. The boundary is sharp: **taint propagation across a dependency edge is legal only when the edge is content-addressed and the cosigner committed to the far side.** Version ranges are not content-addressed. A cosignature over a range is a cosignature over a *set*, and the runtime must not silently narrow that set to "whatever resolves today." ## Operational Effect Runtimes that enforce the boundary pay a measurable cost: they cannot use the marketplace's cosignature as a blanket admissibility token, so every transitive dependency triggers a local policy evaluation against its side-effect declaration. In practice this means (a) dependency graphs must be resolved to concrete hashes *before* load, (b) the consumer's policy engine must run on each node, not just the root, and (c) any node whose hash was not committed in an auditor cosignature is flagged for per-load opt-in. The observable effect is a higher rate of `SIGNED_UNVETTED` loads and occasional hard failures when a floating range resolves to a hash the policy engine rejects — which is the correct behavior, because that is exactly the case where the auditor's guarantee does not reach. Runtimes that skip the boundary show zero load failures and a slow accumulation of taint-laundered children executing under side-effect declarations the auditor never reviewed; the failure is silent until a child's widened declaration is exercised. ```python import hashlib from dataclasses import dataclass from typing import Optional class TaintLaunderingError(RuntimeError): """Raised when a runtime attempts to propagate a cosignature taint across a dependency edge the cosigner never committed to.""" pass @dataclass(frozen=True) class Artifact: name: str version: str body: bytes sha256: str side_effects: dict @dataclass(frozen=True) class Cosignature: auditor_key: str # hash of the structure the auditor actually signed; must commit to # the resolved dependency closure, not just the parent body. committed_closure_hash: Optional[str] def verify_and_load( parent: Artifact, parent_cosig: Cosignature, resolved_children: list[Artifact], parent_dep_specs: list[dict], consumer_policy_clears: callable, ) -> list[Artifact]: # Step 1: signature validity is assumed already checked upstream. # Step 2: the boundary check — did the auditor commit to THIS closure? actual_closure = hashlib.sha256( b"".join(c.sha256.encode() for c in sorted(resolved_children, key=lambda a: a.name)) ).hexdigest() if parent_cosig.committed_closure_hash is None: # Cosignature covers body only. Taint may NOT propagate. for child in resolved_children: if not consumer_policy_clears(child): raise TaintLaunderingError( f"child {child.name}@{child.version} resolved under " f"parent {parent.name}@{parent.version} whose cosignature " f"does not commit to the closure; consumer policy rejected " f"side_effects={child.side_effects!r}" ) return resolved_children if parent_cosig.committed_closure_hash != actual_closure: raise TaintLaunderingError( f"closure hash mismatch for {parent.name}@{parent.version}: " f"cosigner committed {parent_cosig.committed_closure_hash}, " f"runtime resolved {actual_closure}; refusing to inherit taint" ) # Step 3: even with a committed closure, reject any unpinned spec that # could have resolved differently than the cosigner's view. for spec in parent_dep_specs: if not spec.get("sha256"): raise TaintLaunderingError( f"unpinned dependency {spec.get('name')}@{spec.get('range')} " f"in cosigned manifest {parent.name}@{parent.version}; " f"version ranges are not content-addressed" ) return resolved_children ```