{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-of-a-skill-loader-accept-an-attested-manifest-yet-still-execute-injected-code-after-sandbox-rehydration",
  "title": "Why does an instance of a skill loader accept an attested manifest yet still execute injected code after sandbox rehydration",
  "date_of_record": "2026 November 15",
  "scope": "Applies to skill/plugin registries that attest a manifest (hash, signature, declared entrypoints, declared capability set) at publish time and then load the artifact into a sandbox at runtime via a rehydration step (unpickling, deserialization, import-time module construction, or template expansion). Does not apply to pure static linking or to systems where the sandbox boundary is a separate OS process with a syscall filter and the artifact is never deserialized into the loader's own address space.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-of-a-skill-loader-accept-an-attested-manifest-yet-still-execute-injected-code-after-sandbox-rehydration.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-a-skill-loader-accept-an-attested-manifest-yet-still-execute-injected-code-after-sandbox-rehydration.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-a-skill-loader-accept-an-attested-manifest-yet-still-execute-injected-code-after-sandbox-rehydration.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1525,
    "python_slice_tokens": 283,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Attestation covers the *manifest*, not the *rehydration graph*. A registry signature binds (name, version, digest, declared capabilities, declared entrypoint) to a publisher identity. It does **not** bind the transitive set of objects constructed when the sandbox materializes the artifact. The distinction that matters operationally is: - **Attested surface:*...",
    "what_was_observed": "A skill published with a valid manifest: digest matched, signature verified against the publisher key, declared capabilities were `{read:fs:/tmp/scratch, net:none, exec:none}`. The loader performed the correct sequence — verify signature, compare digest, check declared capability set against policy, then rehydrate into the sandbox. Rehydration used a `pickle`-based artifact (the same pathology reproduces with `yaml.l...",
    "condition_of_validity": "The \"attestation implies safe execution\" claim is valid **only** when all of the following hold: - The rehydration function is provably non-evaluating (e.g., `pickle` restricted to a whitelist of primitive `load_*` opcodes, `yaml.safe_load`, `weights_only=True` with a pinned allowlist, or a data-only format like JSON/CBOR with no constructor hooks). - Import...",
    "decision_boundary": "When evaluating whether to trust a rehydrated skill, the loader must decide between: - **Trust the manifest and rehydrate in-process:** acceptable only for artifacts in a non-evaluating format, or for artifacts whose rehydration is itself run in a disposable child process that is killed if it attempts a syscall outside the declared set. - **Refuse rehydratio...",
    "operational_effect": "Operationally, teams that conflate the two surfaces ship loaders that pass every signature test and still execute injected code. The failure is silent in CI because the test artifact is benign; it surfaces only when a malicious artifact is published, and by then the trust boundary has already been crossed in production. The fix is structural, not detective: ..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "01ceed0b66a9ba659d9666875599e4d6b6cbf3d1c1f655a7a07fd60d95f7fb90",
    "verified_classes": [
      "AttestationRehydrationError"
    ],
    "verified_functions": [
      "verify_manifest",
      "rehydrate_confined",
      "_run_confined_child",
      "_load_nonedata",
      "load_skill"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "AttestationRehydrationError"
    ],
    "sample_fail_closed_invariants": [
      "manifest digest does not match publisher key"
    ],
    "stdlib_dependencies": [
      "hashlib",
      "json",
      "pickle",
      "subprocess"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
