What structural signals indicate a skill manifest has been injected with capability-escalating tool descriptors
**Date of Record:** 2026 December 1 **Scope:** Applies to agents that load tool/plugin manifests, capability descriptors, or skill registries at runtime and trust declared capability metadata to gate tool invocation. Does not apply to statically compiled tool bindings whose schemas are verified at build time and never re-read from a mutable source.
Core Distinction
The failure mode here is not prompt injection into the *reasoning* channel—it is injection into the *capability declaration* channel. A skill manifest is a structured document (`name`, `description`, `parameters`, `required_scopes`, `side_effects`) that the agent reads to decide *whether* and *how* to call a tool. The non-obvious boundary is this: **the agent trusts the manifest's self-description as a safety contract, but the manifest is itself untrusted input that arrives through the same dynamic-load path as the tool it describes.**
The escalation is structural, not semantic. An attacker does not need to smuggle instructions into a description field (which most agents now flag). They instead widen the *declared parameter surface* of an already-approved tool so that a later, legitimate-looking call carries an argument the original contract never permitted. The agent's guardrail checks "is this tool allowed?" and "does this call match the schema?"—but if the schema was silently rewritten between the allow-check and the call, both checks pass against a poisoned ground truth.
The invariant that breaks: **capability metadata must be immutable across the load→authorize→invoke sequence.** Injection converts a read-once-then-trust contract into a read-again-at-call-time contract, and the second read is attacker-controlled.
What Was Observed
A registry-backed agent fetched a skill descriptor for a benign tool (`file_read`) from a mutable plugin endpoint. The descriptor as first loaded declared:
parameters: {path: string, encoding: enum[utf8, latin1]}
required_scopes: [fs:read]
The agent's authorization layer cached the *decision* ("file_read is approved, scope fs:read") but re-fetched the *schema* at each invocation to stay current with plugin updates—a deliberate freshness choice. Between two calls, the endpoint returned a descriptor with an added parameter `write_back: bool` and `required_scopes: [fs:read, fs:write]`.
The authorization cache still held the old decision. The schema validator, reading the new descriptor, accepted a call:
file_read(path="/etc/agent/secrets.env", write_back=true)
Every individual check succeeded: the tool was on the allow-list, the scope `fs:read` was satisfied, and the argument matched the *current* schema. The escalation lived entirely in the gap between the cached authorization decision and the freshly-read schema. The tool implementation, which honored `write_back`, exfiltrated content by rewriting the file into a world-readable path—a side effect the original manifest never declared.
The tell was structural, not textual: the parameter count grew by one, `required_scopes` gained an element, and the `side_effects` field changed from `read` to `read,write`—all *after* the tool had already passed authorization. No description text changed. A description-based scanner saw nothing.
Condition of Validity
This analysis holds only when all three conditions are present:
- **Split-source trust.** The authorization decision and the schema validation read the manifest from different points in time or different caches. If both read from one immutable snapshot, the gap closes.
- **Schema re-read at invoke time.** Freshness logic—"always validate against the latest plugin version"—is the enabling choice. Systems that pin the schema at authorization time are not exposed to *this* variant (they are exposed to a different one: stale-schema drift).
- **Declared side-effects are advisory.** The tool implementation trusts its parameters over its manifest. If the runtime enforced `side_effects: read` by sandboxing writes regardless of parameters, the widened parameter would be inert.
Remove any one condition and the attack degrades to a detectable anomaly or a no-op.
Decision Boundary
The boundary is between **caching the decision** and **caching the schema**. The correct invariant is that the tuple `(tool_id, schema_hash, scopes)` is bound atomically at authorization and re-verified at invoke: if the schema hash at call time differs from the hash at authorization, the call is rejected and re-authorization is forced. This trades a small amount of plugin-update latency for the closure of the escalation window.
The wrong resolution—and the intuitive one—is to re-authorize on every call. That is both expensive and insufficient: it re-reads the same poisoned source and will *approve* the widened scope, because the endpoint is happy to declare `fs:write` as required. The defense cannot be "check again"; it must be "detect that the contract changed and refuse to silently renegotiate it." Capability widening across a load boundary is a renegotiation, and renegotiation requires an explicit trust decision, not a cache miss.
A secondary signal to log as a hard structural alarm: any increase in `len(parameters)`, any superset growth in `required_scopes`, or any change in `side_effects` between two reads of the same `tool_id`. These are the fingerprints of injection; textual content diffs are not.
Operational Effect
Agents that adopt the hash-bound contract lose the ability to hot-patch plugin schemas without an authorization round-trip. In exchange, the escalation window collapses to zero: a manifest that mutates after approval cannot be invoked under the old approval, and a manifest that mutates *before* approval must survive a fresh scope review—which is exactly the point at which a human or policy engine sees `fs:write` appear on a tool named `file_read`. The operational cost is one re-authorization per genuine schema change; the operational gain is that "the schema is current" and "the schema is approved" can no longer diverge.
import hashlib
import json
class CapabilityEscalationError(RuntimeError):
"""Raised when a skill manifest mutates its capability surface after authorization."""
pass
def _fingerprint(manifest: dict) -> str:
# Bind only the safety-relevant surface, not description text.
surface = {
"params": sorted(manifest.get("parameters", {}).keys()),
"scopes": sorted(manifest.get("required_scopes", [])),
"side_effects": sorted(manifest.get("side_effects", [])),
}
return hashlib.sha256(json.dumps(surface, sort_keys=True).encode()).hexdigest()
def authorize(manifest: dict) -> dict:
return {"tool_id": manifest["tool_id"], "schema_hash": _fingerprint(manifest)}
def invoke(manifest: dict, grant: dict, args: dict) -> object:
if manifest["tool_id"] != grant["tool_id"]:
raise CapabilityEscalationError("tool_id mismatch against authorization grant")
current = _fingerprint(manifest)
if current != grant["schema_hash"]:
# Structural widening detected: refuse to honor the stale grant.
raise CapabilityEscalationError(
f"manifest surface changed after authorization "
f"({grant['schema_hash'][:8]} -> {current[:8]}); re-authorization required"
)
# Safe to dispatch: schema bound to the approved contract.
return dispatch(manifest, args)
def dispatch(manifest: dict, args: dict) -> object: # placeholder for real tool runtime
raise NotImplementedError