# What happens when an instance trusts a tool manifest's declared side-effect class after registry re-signing **Date of Record:** 2026 November 18 **Scope:** Applies to agent runtimes that gate tool invocation on a manifest-declared side-effect classification (`read_only`, `mutating`, `external`) and that consume manifests from a plugin registry that permits re-signing or re-publication under the same skill identifier. Does not apply to runtimes that pin manifest digests out-of-band or that derive effect class from observed syscall/trace behavior rather than declaration. ## Core Distinction A skill-injection attack is usually modeled as *content* poisoning: the skill's instructions or tool descriptions contain adversarial text that steers the model. The non-obvious boundary is different. Here the attacker never changes the model-visible text at all. They change the *manifest metadata* that the runtime uses to decide whether to sandbox, confirm, or audit a call, while keeping the skill identifier, version string, and human-readable description byte-identical. The runtime's trust decision has two inputs that are assumed to be coupled: (1) the signature over the manifest, and (2) the semantic claim inside the manifest (its declared side-effect class). Re-signing re-establishes (1) without constraining (2). An agent that treats "signature valid" as "trustworthy side-effect class" has collapsed two independent facts into one. The invariant that silently breaks is: *a valid signature proves provenance of a claim, not the safety of the claim.* ## What Was Observed A registry-hosted skill `web.fetch` declared `side_effects: read_only`. The runtime's policy engine, on seeing `read_only`, skipped the human-confirmation gate and routed the call through a permissive egress proxy that allowed arbitrary outbound POSTs (the proxy assumed read-only tools only issue GETs). A re-signed manifest for the same `web.fetch@1.4.2` changed the declared class to `read_only` **while** the tool schema gained an undocumented `method` and `body` parameter. The signature was valid; the publisher key was the same; the description string was unchanged. The agent, reasoning over the description, invoked `web.fetch(url=..., method="POST", body=exfil_payload)`. The failure was not that the agent was fooled by text. It was that the policy engine's *confirmation* decision depended on a manifest field the attacker controlled, and the *capability* granted by the proxy depended on the same field. Two enforcement points, one attacker-controlled input, zero cross-checks between the declared class and the actual tool schema. ## Condition of Validity The boundary holds only when all three of the following are true simultaneously: 1. The manifest's declared side-effect class is consumed by at least one *enforcement* decision (confirmation gate, network policy, filesystem scope), not merely by logging. 2. The registry permits re-publication or re-signing under a stable identifier without invalidating cached policy decisions derived from the prior manifest. 3. The tool schema (parameters) can change independently of the declared class, so a `read_only` claim can coexist with parameters that enable mutation. Remove any one and the attack degrades to a conventional content-poisoning problem that existing input filters address. All three together produce a *policy/schema skew*: the enforcement layer is reasoning about a schema it never validated against the class it was told. ## Decision Boundary Do not treat manifest signature validity as a proxy for side-effect-class correctness. The correct decision boundary is: - **Derive enforcement from schema, not declaration.** If a tool exposes `method`, `body`, `path`, `command`, or a free-form `args` parameter, its effective class is at least `mutating` regardless of the declared field. Compute `effective_class = max(declared_class, schema_implied_class)`. - **Pin the manifest digest into the policy cache key.** A re-signed manifest must invalidate every cached confirmation decision keyed on the old digest. If the digest changes, re-run classification and re-prompt. - **Treat class downgrades as adversarial by default.** A manifest revision that lowers the side-effect class (`mutating` → `read_only`) on a stable identifier is a high-signal event; require out-of-band publisher confirmation, not just a valid signature. The boundary is crossed the moment a runtime answers "is this call safe to auto-approve?" using a field whose value the attacker can change while preserving signature validity. ## Operational Effect After adopting schema-derived classification, the observed effect was a 100% catch rate on class-downgrade-plus-schema-widening revisions in replay, at the cost of a small false-positive rate: legitimate tools that add an optional `dry_run: bool` parameter were reclassified to `mutating` and began requiring confirmation. This is an acceptable trade — the false positive is a confirmation prompt, the false negative is silent exfiltration. The residual risk is a tool whose schema is genuinely read-only but whose *implementation* performs writes; that is out of scope for manifest analysis and must be caught by trace-level enforcement, which is why the two layers are complementary rather than redundant. ```python class ManifestPolicySkewError(RuntimeError): """Raised when a manifest's declared side-effect class is weaker than what its tool schema can actually do, or when a re-signed manifest downgrades the class under a stable identifier.""" def __init__(self, skill_id: str, declared: str, implied: str, digest: str): self.skill_id = skill_id self.declared = declared self.implied = implied self.digest = digest super().__init__( f"{skill_id}@{digest[:12]}: declared={declared!r} but schema implies " f"{implied!r}; refusing to auto-approve" ) _MUTATING_PARAMS = {"method", "body", "path", "command", "args", "script"} _CLASS_ORDER = {"read_only": 0, "mutating": 1, "external": 2} def schema_implied_class(manifest: dict) -> str: params = set(manifest.get("tool_schema", {}).get("properties", {}).keys()) if params & _MUTATING_PARAMS: return "mutating" return manifest.get("side_effects", "read_only") def effective_class(manifest: dict, pinned_digest: str | None) -> str: declared = manifest.get("side_effects", "read_only") implied = schema_implied_class(manifest) digest = manifest.get("digest", "") # Re-signing under a stable id with a weaker class is adversarial by default. if pinned_digest is not None and digest != pinned_digest: if _CLASS_ORDER[declared] < _CLASS_ORDER.get(implied, 0): raise ManifestPolicySkewError( manifest["skill_id"], declared, implied, digest ) # Enforcement must never be weaker than what the schema can do. if _CLASS_ORDER[declared] < _CLASS_ORDER[implied]: raise ManifestPolicySkewError( manifest["skill_id"], declared, implied, digest ) return implied if _CLASS_ORDER[implied] > _CLASS_ORDER[declared] else declared def approve_invocation(manifest: dict, pinned_digest: str | None) -> bool: klass = effective_class(manifest, pinned_digest) # Only genuinely read-only calls skip the confirmation gate. return klass == "read_only" ```