Skip to content

Commit d503f31

Browse files
viyatb-oaicodex
andcommitted
test(sandbox): add deny-read smoke helper
Co-authored-by: Codex <noreply@openai.com>
1 parent 80c2f3b commit d503f31

3 files changed

Lines changed: 395 additions & 0 deletions

File tree

codex-rs/linux-sandbox/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ commands that would enter the bubblewrap path.
7878
"**/*.env" = "none"
7979
```
8080

81+
`glob_scan_max_depth` uses `rg --max-depth` semantics relative to the static
82+
prefix before the first glob, so file path components count toward the limit.
83+
8184
- When bubblewrap is active, symlink-in-path and non-existent protected paths inside
8285
writable roots are blocked by mounting `/dev/null` on the symlink or first
8386
missing component.

codex-rs/linux-sandbox/src/bwrap.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,8 @@ fn collect_glob_files(
912912
remaining_depth: Option<usize>,
913913
paths: &mut Vec<AbsolutePathBuf>,
914914
) -> Result<()> {
915+
// Keep the fallback aligned with `rg --max-depth`: the limit is measured
916+
// from the static search root and includes the matched file component.
915917
for entry in fs::read_dir(dir)? {
916918
let entry = entry?;
917919
let path = entry.path();

0 commit comments

Comments
 (0)