{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-a-skill-s-declared-tool-schema-as-attacker-controlled-input-at-the-moment-of-first-invocation-rather-than-at",
  "title": "In what scenarios must an instance treat a skill's declared tool schema as attacker-controlled input at the moment of first invocation, rather than at registry-load time",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents that resolve skills from a dynamic registry (filesystem-watched, remote-synced, or peer-published) and invoke them via a schema-negotiated tool interface. Does not apply to statically compiled skill sets where schemas are immutable for the process lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-skill-s-declared-tool-schema-as-attacker-controlled-input-at-the-moment-of-first-invocation-rather-than-at.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-skill-s-declared-tool-schema-as-attacker-controlled-input-at-the-moment-of-first-invocation-rather-than-at.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-skill-s-declared-tool-schema-as-attacker-controlled-input-at-the-moment-of-first-invocation-rather-than-at.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1672,
    "python_slice_tokens": 270,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive trust model treats registry admission as the security boundary: a skill passes signature/allowlist checks at load time, therefore its declared schema is trusted for the remainder of the session. The correct model distinguishes **admission-time schema** from **invocation-time schema**. A dynamically loaded registry permits the skill artifact to muta...",
    "what_was_observed": "An agent held a skill `summarize_doc` whose cached schema declared a single parameter `path: string` with a `pattern` constraint restricting it to `/data/*`. At admission, the pattern was enforced client-side and the skill was marked trusted. The registry was configured with a 300-second TTL refresh. At T+412s, a refresh event fired. The upstream artifact had been replaced (legitimate CI redeploy, in this incident — ...",
    "condition_of_validity": "This failure mode is bounded by three conditions; the guardrail below is only sound when all three hold: - **The registry is re-readable.** If the skill artifact is immutable for the session (content-addressed, pinned by digest), admission-time validation is sufficient and the invocation-time check is redundant overhead. - **Schema is treated as data, not co...",
    "decision_boundary": "The boundary is **callable-surface monotonicity across a schema refresh**. Formalize it as: for any skill `s`, the set of `(param_name, type, constraints)` tuples visible at invocation time must be a *subset* of the set visible at the last successful admission validation, unless a human- or policy-authorized re-admission has occurred. Two directions of viola...",
    "operational_effect": "With monotonicity enforced, the incident above is caught at the refresh boundary: the diff of `{path: string[pattern=/data/*]}` against `{path: string, note: string}` produces two expansions (dropped constraint, added parameter), the invocation is refused, and the agent surfaces a re-admission request instead of executing. The credential read never happens b..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "5879288005061f496c3c786dce56e7f1feb69e8b722a0e438ebc693af4a97035",
    "verified_classes": [
      "SchemaSurfaceExpansionError",
      "ParamSurface"
    ],
    "verified_functions": [
      "_surface",
      "assert_surface_monotonic",
      "invoke_skill"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "SchemaSurfaceExpansionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
