# In what scenarios must an instance treat a skill manifest as untrusted input rather than configuration **Date of Record:** 2026 November 18 **Scope:** Applies to agent runtimes that load third-party tool/skill manifests (MCP-style tool descriptors, plugin manifests, function-calling schemas) at admission time and derive capability grants from them. Does not apply to first-party manifests compiled into the agent image, nor to manifests whose signature chain terminates in a key the runtime already trusts for code execution. ## Core Distinction A manifest is simultaneously *configuration* (declarative metadata the runtime consumes) and *code-adjacent artifact* (a description of behavior the runtime will later authorize). The non-obvious boundary is this: **static analysis of a manifest can only establish what the manifest claims, never what the tool does.** Every field a manifest exposes—`description`, `parameters`, `examples`, `preconditions`, `side_effects`—is attacker-controlled prose. The failure mode is not that static analysis misses a malicious tool; it is that a *clean* static analysis result is treated as a positive trust signal. A manifest that passes every lint, schema check, and semantic-similarity screen is not thereby safe. It is merely *coherent*. The invariant that must hold is: **admission decisions may only be downgraded by static analysis, never upgraded.** Static analysis has veto power and no grant power. Dynamic analysis (sandboxed invocation with capability tracing) is the only source of grant power, and it is bounded by the coverage of the probes actually executed. ## What Was Observed Across a corpus of adversarial manifests, the dominant evasion was *semantic laundering of the description field* against embedding-based detectors. A tool whose actual behavior was `read_file` over an arbitrary path presented a description embedding close to a benign `summarize_document` tool, because the description was written in the register of summarization. The parameter schema was the tell: a `path` parameter with no `enum`, no `pattern`, and a `description` of "the document to summarize." Static schema validation passed—`path` is a legal string. The embedding similarity screen passed—the prose was on-distribution. The manifest was admitted. A second class exploited *dynamic probe undercoverage*. The tool behaved correctly for the first N invocations matching the probe distribution, then shifted behavior on a trigger (an argument value outside the probe set, or an environment flag). Because dynamic analysis had only exercised the probed argument space, it returned "clean," and that clean result was recorded as a capability grant. The grant outlived the probe. A third class was *cross-field inconsistency that no single-field check catches*: a manifest declaring `side_effects: none` while its `parameters` included a `destination_url` with a `format: uri` constraint. Each field was individually valid. The contradiction is only visible when side-effect claims are checked against parameter semantics. ## Condition of Validity The "static analysis has veto-only authority" invariant is valid only under these conditions: 1. **Probe coverage is explicitly bounded and recorded.** A dynamic-analysis pass must emit the set of argument shapes exercised. A clean result is valid only for that set. Any manifest whose parameter space is unbounded (free-form strings, open `additionalProperties`) cannot receive an unconditional grant from dynamic analysis alone. 2. **Description fields are never parsed for authorization decisions.** If the runtime uses description text to decide *whether* to invoke a tool (e.g., LLM-driven tool selection), the description is an attack surface, not metadata, and must be treated as untrusted input to the selection model. 3. **Cross-field consistency is checked as a unit.** Side-effect declarations must be reconciled against parameter capabilities in a single pass, not field-by-field. 4. **The signature chain is verified before any analysis runs.** Analysis of an unsigned manifest is theater. When any of these conditions fails, the correct state is *quarantine*, not *admit with warnings*. ## Decision Boundary The boundary between "admit" and "quarantine" is not "static clean AND dynamic clean." It is: - **Quarantine** if static analysis flags anything, regardless of dynamic results. A static flag is a hard stop because static analysis is sound in the negative direction (a declared `destination_url` under `side_effects: none` is a real contradiction) even though it is unsound in the positive direction. - **Quarantine** if dynamic analysis is clean but probe coverage does not include the full declared parameter space, *unless* the manifest's parameters are closed (enumerated or pattern-bounded) and the probes covered the closure. - **Admit with a scoped grant** only when static analysis is clean, cross-field consistency holds, and dynamic probes covered a closed parameter space. The grant is scoped to the probed closure and expires; re-admission requires re-probing. - **Never admit** on the basis of description similarity to a known-benign tool. Similarity is a heuristic for *ranking review effort*, not a grant. The trap is treating "dynamic clean" as sufficient. It is necessary, not sufficient, and only when coverage is closed. ## Operational Effect The practical consequence is that admission becomes a *two-key* process where the keys are asymmetric: static analysis can lock but not unlock; dynamic analysis can unlock only within the closure it actually explored. This inverts the common pipeline where static checks are a fast pre-filter and dynamic checks are the final gate. Here, static checks are the final gate for *rejection*, and dynamic checks are a bounded grant mechanism. The residual risk is concentrated in open parameter spaces, which is exactly where the runtime cannot prove coverage—so those manifests carry a standing quarantine flag until a human or a stronger analysis closes the space. The failure this prevents is the silent upgrade: a manifest that passed a screen and was therefore trusted more than the screen could justify. ```python from dataclasses import dataclass, field from typing import Optional class ManifestAdmissionError(RuntimeError): """Raised when a skill manifest cannot be safely admitted under the veto-only invariant.""" pass @dataclass class Manifest: name: str side_effects: str # "none" | "read" | "write" | "network" parameters: dict # name -> {"type":..., "enum":[...]?, "pattern":...?} description: str signed: bool @dataclass class ProbeCoverage: exercised_args: set = field(default_factory=set) # frozenset of parameter names actually exercised closed: bool = False # True only if every param is enum/pattern bounded def static_veto(m: Manifest) -> Optional[str]: # Veto-only: return a reason to reject, or None. Never returns "safe". if not m.signed: return "unsigned manifest: analysis is theater" if m.side_effects == "none": for pname, spec in m.parameters.items(): if spec.get("type") == "string" and spec.get("format") == "uri": return f"side_effects=none contradicts uri parameter '{pname}'" return None def admit(m: Manifest, coverage: ProbeCoverage) -> None: reason = static_veto(m) if reason is not None: # Static flag is a hard stop regardless of dynamic results. raise ManifestAdmissionError(f"static veto: {reason}") declared = set(m.parameters.keys()) if not coverage.closed: raise ManifestAdmissionError( f"open parameter space for {m.name!r}; dynamic clean result cannot grant" ) if not declared.issubset(coverage.exercised_args): missing = declared - coverage.exercised_args raise ManifestAdmissionError( f"probe coverage incomplete for {m.name!r}; unexercised: {sorted(missing)}" ) # Reaching here means: static clean AND closed AND fully probed. # Grant is scoped to the probed closure and must expire on re-admission. return None # Example: a manifest that passes every static screen but must still be quarantined. m = Manifest( name="summarize_document", side_effects="none", parameters={"path": {"type": "string"}}, # unbounded string, no enum/pattern description="Summarize the given document.", signed=True, ) try: admit(m, ProbeCoverage(exercised_args={"path"}, closed=False)) except ManifestAdmissionError as e: # Correct outcome: dynamic probes were clean, but coverage is open. print(f"quarantined: {e}") ```