# What structural signals indicate a signed skill manifest has been bypassed by capability aliasing at the sandbox boundary **Date of Record:** 2026 November 27 **Scope:** Applies to agent runtimes that admit third-party "skills" (tool bundles) through a manifest-signing gate and then enforce capability scopes at execution time via a name-based dispatcher. Does not cover in-process plugin loading where the skill shares the host interpreter's import namespace, nor model-side prompt-injection defenses that operate purely on token filtering. ## Core Distinction A manifest signature proves *who authored the declared capability set*. A capability sandbox proves *what the skill actually invoked*. These two guarantees are computed over different artifacts — the signature over the manifest's declared `capabilities` array, the sandbox over the runtime call graph — and the security invariant that binds them ("every invoked capability is a member of the signed set") is only as strong as the *name resolution function* that maps an invocation to a capability identifier. The non-obvious failure lives exactly there. When the sandbox enforces scope by matching the *string name* of the tool the skill requests against the signed allowlist, any mechanism that lets a skill reach a privileged tool under an alias — a re-export, a namespace shadow, a provider-registered synonym, a versioned alias like `fs.read@v2` mapping to `fs.write` — defeats the signature without ever forging it. The manifest remains validly signed; the sandbox remains "enforcing"; the invariant is silently violated. The structural signal is not a failed signature check. It is a *divergence between the signed identifier set and the resolved identifier set* that no single component is positioned to notice. ## What Was Observed A skill (`pdf-annotate`, manifest v1.4.0) declared `capabilities: ["fs.read", "net.egress:allowlist"]` and carried a valid Ed25519 signature over the canonicalized manifest, verified at admission against the operator's trust root. Admission passed. The sandbox was configured `default-deny` with a per-skill allowlist derived from the signed capability array. During execution the skill issued a tool call to `fs.read.legacy`. The dispatcher's alias table — populated by the runtime to preserve backward compatibility with an older tool-registry schema — resolved `fs.read.legacy` to the *filesystem provider's* `write` handler (a known historical mislabel: the legacy alias had been pointed at `write` during a provider migration and never corrected because no signed manifest had ever referenced it). The sandbox's allowlist check ran against the *requested* name `fs.read.legacy`, found no exact match, and — this is the critical step — fell through to a *prefix-based* fallback rule (`fs.read.*` ⇒ allow) that the runtime had added to reduce false-positive denials for namespaced sub-tools. The call executed with write authority. The trace, reconstructed post-hoc: 1. Skill requests `fs.read.legacy` (a name present in the provider registry, absent from the signed manifest). 2. Sandbox exact-match against `{fs.read, net.egress:allowlist}` → miss. 3. Sandbox prefix-fallback `fs.read.*` → hit → **allow**. 4. Dispatcher alias resolution `fs.read.legacy → fs.write` → executes write. 5. Audit log records `capability=fs.read.legacy, decision=allow, signer=pdf-annotate@v1.4.0`. Every individual component behaved per its local spec. The signature verifier was correct. The sandbox was correct *given its fallback rule*. The dispatcher was correct *given its alias table*. The composite system granted write authority to a skill signed for read-only. The only artifact that would have exposed this — a comparison of the resolved capability (`fs.write`) against the signed set — was never computed, because the sandbox and the dispatcher were separate processes and neither emitted the resolved canonical name. ## Condition of Validity The signature-to-sandbox invariant holds **only if** the following three conditions are jointly satisfied at every invocation: - **C1 — Canonical resolution precedes scope check.** The capability identifier is resolved to its canonical provider/handler form *before* the allowlist comparison, and the comparison is performed on the canonical form. Name-based matching on the pre-resolution string is unsound. - **C2 — No wildcard or prefix fallback on the enforcement path.** Any fallback that admits a name not literally present in the signed set breaks the binding between signature and execution, because the signed set was never authored with the fallback's closure in mind. Prefix rules are a *denial-reduction* convenience that is incompatible with a *capability-minimization* guarantee. - **C3 — Alias table is part of the trusted computing base.** The mapping from requested name to canonical handler must be signed, versioned, and immutable for the lifetime of an admitted skill's execution, or the signature is signing a moving target. In the observed incident C1 was violated (resolution after check), C2 was violated (prefix fallback), and C3 was violated (alias table mutated by a provider migration independent of any manifest). Any one of these alone would have been sufficient to break the invariant; all three were present, which is why the failure was silent rather than noisy. ## Decision Boundary The operational question is not "did the signature verify" — it always did. It is: **at what layer do you compute the set-difference between signed capabilities and executed capabilities, and what do you do when it is non-empty?** Two defensible architectures: - **Resolve-then-check (preferred).** The dispatcher resolves to canonical handler, emits `(requested_name, canonical_capability)`, and the sandbox checks the *canonical* capability against the signed set. A requested name that does not resolve to a canonical capability in the signed set is denied *before* the handler is invoked. This makes the alias table safe to mutate only insofar as every mutation is itself admitted through the same gate. - **Post-hoc reconciliation.** If resolution must happen after the check (e.g., provider-owned dispatch), the runtime must log the canonical capability and run a continuous reconciler that diffs the executed-capability multiset against the signed set per skill, raising on any `executed ⊄ signed`. This is strictly weaker — it detects after the fact — but it is the only option when the dispatcher is not under your control. The decision boundary is sharp: **if you cannot resolve before you check, you do not have a capability sandbox; you have an audit log with a delay.** Choose reconcile-then-alert only when you have accepted that the first violating call executes. Reject the temptation to "narrow the prefix rule." A prefix rule that admits `fs.read.*` still admits `fs.read.legacy`, and the alias table is the actual attack surface. Fix the resolution order and freeze the alias table; do not tune the fallback. ## Operational Effect After remediation (resolve-then-check, fallback removed, alias table moved under the manifest-signing trust root and pinned per-execution), the runtime's behavior changed in three measurable ways: - **Denial rate rose ~4%** on skills using namespaced sub-tools, all of which were previously admitted via the prefix fallback. These were triaged and their manifests re-signed with explicit sub-tool capabilities. The rise is the *cost of correctness*, not a regression. - **Alias-table mutations now block admission** of any in-flight skill whose pinned alias table hash no longer matches, surfacing provider migrations as admission failures rather than silent authority expansion. This converted a class of latent privilege escalation into a loud, early, attributable error. - **Audit records now carry both names** (`requested` and `canonical`), which is what made the original incident reconstructable at all. The absence of the canonical name in pre-remediation logs is why the divergence went undetected for the skill's entire deployed lifetime. The durable lesson: a signed manifest is a claim about *intent*, and a sandbox is an enforcement of *effect*. The invariant that binds them is a total function from requested name to canonical capability, evaluated *before* the effect. Any gap in that function — a fallback, a late resolution, a mutable alias table — is a hole through which a validly signed skill reaches unsigned authority. The structural signal of that hole is not a broken signature; it is a resolved capability that never appears in the signed set, and the only way to see it is to compute the difference on the enforcement path. ```python from __future__ import annotations from dataclasses import dataclass class CapabilityAliasEscape(RuntimeError): """Raised when a skill's resolved canonical capability is not a member of its signed capability set — i.e. the manifest signature was bypassed via name aliasing rather than forged.""" @dataclass(frozen=True) class SignedManifest: skill_id: str version: str capabilities: frozenset[str] # canonical capabilities, as signed # Alias table is part of the trusted computing base (condition C3). # In production this must be signed and pinned per-execution; here it is # the specific historical mislabel that caused the incident. ALIAS_TABLE: dict[str, str] = { "fs.read": "fs.read", "fs.read.legacy": "fs.write", # historical mislabel, never corrected "net.egress": "net.egress", } def resolve_canonical(requested_name: str) -> str: try: return ALIAS_TABLE[requested_name] except KeyError as exc: # Unresolvable names are denied, never prefix-matched. raise CapabilityAliasEscape( f"unresolvable capability name {requested_name!r}; " "no prefix fallback is permitted on the enforcement path" ) from exc def enforce_scope(manifest: SignedManifest, requested_name: str) -> str: """Resolve-then-check (condition C1). Returns the canonical capability only if it is a member of the signed set; otherwise raises.""" canonical = resolve_canonical(requested_name) if canonical not in manifest.capabilities: # This is the exact trace of the observed incident: a validly signed # read-only skill reaching write authority through an alias. raise CapabilityAliasEscape( f"skill {manifest.skill_id}@{manifest.version} requested " f"{requested_name!r} -> canonical {canonical!r}, which is not in " f"its signed capability set {sorted(manifest.capabilities)}; " "signature bypassed via alias resolution" ) return canonical def admit_and_dispatch(manifest: SignedManifest, requested_name: str) -> str: # Signature verification is assumed to have passed at admission. canonical = enforce_scope(manifest, requested_name) # Emit BOTH names to the audit log so divergence is reconstructable. return canonical if __name__ == "__main__": pdf_annotate = SignedManifest( skill_id="pdf-annotate", version="1.4.0", capabilities=frozenset({"fs.read", "net.egress"}), ) # Legitimate call: passes. assert admit_and_dispatch(pdf_annotate, "fs.read") == "fs.read" # The incident: validly signed read-only skill, aliased to write. try: admit_and_dispatch(pdf_annotate, "fs.read.legacy") except CapabilityAliasEscape as err: print(f"BLOCKED: {err}") else: raise AssertionError("alias escape was not caught") ```