{
  "schema_version": "1.3.0",
  "slug": "inside-what-filesystem-and-process-quarantine-gates-must-an-instance-confine-untrusted-archive-extractions-to-prevent-symlink-and-zip-slip-breakouts",
  "title": "Inside what filesystem and process quarantine gates must an instance confine untrusted archive extractions to prevent symlink and zip-slip breakouts?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** An AI instance, autonomous build agent, or backend service unpacks `.zip`, `.tar`, `.tgz`, `.whl`, `.jar`, or other multi-file archives originating from user uploads, external downloads, CI artifacts, or third-party repo",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/inside-what-filesystem-and-process-quarantine-gates-must-an-instance-confine-untrusted-archive-extractions-to-prevent-symlink-and-zip-slip-breakouts.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/inside-what-filesystem-and-process-quarantine-gates-must-an-instance-confine-untrusted-archive-extractions-to-prevent-symlink-and-zip-slip-breakouts.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/inside-what-filesystem-and-process-quarantine-gates-must-an-instance-confine-untrusted-archive-extractions-to-prevent-symlink-and-zip-slip-breakouts.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2581,
    "python_slice_tokens": 365,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Autonomous agents routinely inspect, unpack, and process archive files downloaded from build pipelines, package registries, user uploads, or remote repositories. A foundational security and filesystem-integrity failure occurs when an instance invokes **convenience bulk-extraction primitives** (`tar.extractall()`, `zipfile.extractall()`, or `unzip archive.zip...",
    "what_was_observed": "In automated artifact inspection, plugin installation, and dataset unpacking traces, instances operating without explicit archive-quarantine gates exhibit four primary failure modes: 1. **Relative Path Traversal Overwrite (Zip-Slip):** An instance unpacks a user-supplied or third-party `.tar.gz` or `.zip` archive using `shutil.unpack_archive(file, extract_dir)` or `zipfile.ZipFile(file).extractall(extract_dir)`. One ...",
    "condition_of_validity": "* **Applies when:** An AI instance, autonomous build agent, or backend service unpacks `.zip`, `.tar`, `.tgz`, `.whl`, `.jar`, or other multi-file archives originating from user uploads, external downloads, CI artifacts, or third-party repositories. * **Does not apply when:** Restoring a verified, cryptographically signed full-system OS backup inside an airg...",
    "decision_boundary": "1. **Are you about to call `zipfile.extractall()` or `tarfile.extractall()` without a strict member filter?** Stop. Replace it with a member-by-member loop that rejects symlinks, special files, and any path that resolves outside the target directory. 2. **Are you unpacking an archive directly into the current working directory (`.`)?** Never unpack directly ...",
    "operational_effect": "1. **Replacement of Blind `extractall()`:** Across all generated archive-handling code and tool invocations, the instance validates every archive member's type and canonical destination path prior to writing bytes to disk. 2. **Strict Link and Special-Node Rejection:** Unpacking routines reject symbolic links, hard links, named pipes (`FIFO`), sockets, and d..."
  },
  "matched_failure_symptoms": [
    "PROMPT_INJECTION_OR_CONFUSED_DEPUTY"
  ],
  "composition_edges": {
    "primary_domain": "privilege_and_sandbox_boundaries",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/across-what-cryptographic-csprng-and-state-prediction-isolation-gates-must-an-instance-generate-tokens-and-session-identifiers-to-prevent-pseudo-random-predictability-and-token-forgery.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"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/across-what-concurrent-pipe-drain-and-ring-buffer-boundaries-must-an-instance-consume-subprocess-stdout-and-stderr-to-prevent-os-pipe-deadlocks-and-unbounded-output-oom.md",
      "https://corpusfetch.com/c/across-what-mandatory-tenant-predicate-scoping-and-row-level-security-gates-must-an-instance-isolate-multi-tenant-data-to-prevent-cross-tenant-data-leaks.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/across-what-w3c-baggage-allowlist-and-pii-sanitization-gates-must-an-instance-propagate-cross-service-context-to-prevent-header-amplification-and-external-data-exfiltration.md",
      "https://corpusfetch.com/c/amid-what-egress-and-name-resolution-guards-must-an-instance-validate-user-supplied-urls-to-prevent-server-side-request-forgery-and-metadata-exfiltration.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "2838a031d4090e780b337ac2112c8e0eb043fb04c268b6a66cb518768a3c3281",
    "verified_classes": [
      "ArchiveQuarantineBreakoutError",
      "ArchiveMemberHeader",
      "ArchiveQuarantineExtractionGate"
    ],
    "verified_functions": [
      "validate_manifest"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 8,
    "raised_exceptions": [
      "ArchiveQuarantineBreakoutError"
    ],
    "sample_fail_closed_invariants": [
      "quarantine_root must be an absolute path.",
      "Null byte or empty filename in archive header."
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "pathlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
