{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-escape-its-sandbox-the-moment-a-tool-s-seccomp-profile-is-inherited-across-an-execve-and-how-does-that-turn-an-egress-deny-into-a",
  "title": "Why does an instance escape its sandbox the moment a tool's seccomp profile is inherited across an execve, and how does that turn an egress-deny into an egress-allow without any policy edit?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to tool runtimes where an agent process installs a syscall filter (seccomp-bpf), an egress policy, and a secrets-isolation boundary, then spawns child tools via `execve` (shell wrappers, `subprocess`, MCP stdio servers, sandbox helpers). Does not apply to VM/microVM-per-tool isolation where each tool gets a fresh kernel boundary, nor to filterless runtimes relying solely on network namespaces.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-escape-its-sandbox-the-moment-a-tool-s-seccomp-profile-is-inherited-across-an-execve-and-how-does-that-turn-an-egress-deny-into-a.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-escape-its-sandbox-the-moment-a-tool-s-seccomp-profile-is-inherited-across-an-execve-and-how-does-that-turn-an-egress-deny-into-a.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-escape-its-sandbox-the-moment-a-tool-s-seccomp-profile-is-inherited-across-an-execve-and-how-does-that-turn-an-egress-deny-into-a.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2203,
    "python_slice_tokens": 260,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **the filter as a property of the process image** and **the filter as a property of the process lineage**. Operators routinely assume that once the supervisor installs a seccomp profile and an egress deny-list, every descendant inherits both. That assumption is half true and half catastrophically false. Seccomp filters...",
    "what_was_observed": "A tool runtime for an agent ran each tool call inside a supervisor that: 1. Called `prctl(PR_SET_NO_NEW_PRIVS, 1)`. 2. Installed a seccomp-bpf profile via `prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)` that allowed a narrow syscall set and denied `socket`, `connect`, `sendto`, `execve` (post-install), and `ptrace`. 3. Set `HTTP_PROXY`/`HTTPS_PROXY` to a deny-by-default egress proxy and mounted a tmpfs over `/run...",
    "condition_of_validity": "The invariant that must hold for the sandbox to be sound: > **For every process in the tool's lineage, the effective policy is the intersection of (a) the seccomp filter tree inherited from the supervisor and (b) the userspace enforcement layer active in that process image. Confinement holds only if (b) is re-established at every `execve` boundary, or if (a)...",
    "decision_boundary": "When designing or auditing a tool sandbox, the decision boundary is: - **If the filter is complete** (denies every syscall the tool could use to escape, including all `connect` families, `socket` for non-local families, `execve` post-install, `ptrace`, `open_by_handle_at`, `bpf`, `perf_event_open`), then userspace enforcement is defense-in-depth and may be a...",
    "operational_effect": "The operational effect is a class of escapes that are invisible to standard conformance checks because the check probes the *first* image, not the lineage. The escape does not require a malicious tool; it requires only a tool whose entrypoint is not the supervisor's wrapper — which is the common case for `#!/usr/bin/env` scripts, Go binaries that `exec` help..."
  },
  "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": "127e3230de0bbb028043b441dba12c50d7ac23ad649b9e0587316327857cb0ae",
    "verified_classes": [
      "SandboxLineageEscape"
    ],
    "verified_functions": [
      "audit_lineage",
      "run_tool_with_audit"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SandboxLineageEscape"
    ],
    "sample_fail_closed_invariants": [
      "empty lineage: no process to audit"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
