Repository navigation
Conversation
Implement ExecSeal Tier 1 (linux_bwrap) and Tier 2 (linux_landlock_seccomp) OS containment, Door 1 FD-pinned output promotion, ArtifactLedger verification, --allow-unsandboxed-elaboration, Pass 2 SandboxMode::RequireBwrap enforcement (including non-module .ir rejection), sandbox_escape tests, and the aarch64 ExecSeal CI job. Source: https://github.com/joshlf/anneal/tree/cad10960a7d415acdb1e04198835d32bc25f49fd Agent-authored-by: AI agent acting on joshlf's behalf
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b9c7a0262
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| cmd.arg("--bind") | ||
| .arg(&policy.rw_out.host) | ||
| .arg(&policy.rw_out.child); |
There was a problem hiding this comment.
Cap aggregate writes to host-backed output directories
A hostile elaborator can create and close an arbitrary number of files in the writable host-backed output directory. RLIMIT_FSIZE limits each file individually, while RLIMIT_NOFILE limits only concurrently open descriptors, and Door 1 inspects outputs only after the child exits; therefore a loop creating many files can exhaust the host filesystem or inode quota before the timeout. This affects both Tier 1's host bind and Tier 2's RW_SCRATCH_DIR, so the writable output needs an aggregate quota or bounded backing store.
Useful? React with 👍 / 👎.
| let stdout = stdout_thread.join().unwrap_or_default(); | ||
| let stderr = stderr_thread.join().unwrap_or_default(); |
There was a problem hiding this comment.
Reap the process group before joining output readers
With --allow-unsandboxed-elaboration, hostile Lean code can fork a descendant that inherits stdout or stderr and then let the direct child exit. try_wait then reports completion, but these unconditional joins wait forever for EOF from the surviving descendant, so the wall-clock deadline is no longer checked and the verification command can hang indefinitely. Kill/reap the isolated process group after direct-child completion, or make pipe draining itself respect the deadline, before joining these threads.
Useful? React with 👍 / 👎.
| let lean_binary_sha256 = sha256_file_deref(&exec_lean, "toolchain") | ||
| .map_err(|e| Failure::operational("toolchain", e.message))?; |
There was a problem hiding this comment.
Recheck the executable whose digest was admitted
When unpinned Lean is supplied through a shim or wrapper whose --print-prefix contains a distinct bin/lean (for example an elan-style installation), admission now hashes and executes exec_lean, but run_target still performs its final provenance check by hashing self.lean_path(). The wrapper and real executable normally have different digests, so an otherwise successful --allow-unpinned-lean run fails with “unpinned Lean executable changed during run”; conversely, this check does not detect a post-admission replacement of the executable that was actually used. Store and re-hash adm.exec_lean at the accepting boundary.
Useful? React with 👍 / 👎.
Human review surface
Implement ExecSeal Tier 1 (linux_bwrap) and Tier 2 (linux_landlock_seccomp) OS containment, Door 1 FD-pinned output promotion, ArtifactLedger verification, --allow-unsandboxed-elaboration, Pass 2 SandboxMode::RequireBwrap enforcement (including non-module .ir rejection), sandbox_escape tests, and the aarch64 ExecSeal CI job.
Layer 17 of 19 in the migrated Anneal verification stack under
anneal/.Public Anneal source checkpoint.
Authored by an AI agent acting on joshlf's behalf.