Skip to content

Commit 7a08dfb

Browse files
committed
probe: go deeper, and test the vendored bwrap either side of the flip
1 parent ab75048 commit 7a08dfb

1 file changed

Lines changed: 22 additions & 4 deletions

File tree

‎.github/workflows/probe-sandbox.yml‎

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,25 @@ jobs:
3333
run: |
3434
set +e
3535
npm install -g @openai/codex@0.146.0 >/dev/null 2>&1
36-
echo "=== binaries on PATH ==="
37-
which codex; which codex-linux-sandbox
38-
echo "=== what the package contains ==="
39-
find "$(npm root -g)/@openai/codex" -maxdepth 3 -type f \( -name "codex*" -o -name "*sandbox*" \) 2>/dev/null | head -20
36+
root="$(npm root -g)/@openai/codex"
37+
echo "=== every file the package ships ==="
38+
find "$root" -type f | head -40
39+
echo "=== anything that looks like a sandbox helper ==="
40+
find "$root" -type f \( -name "*bwrap*" -o -name "*sandbox*" \) 2>/dev/null
41+
42+
- name: Does the vendored bwrap work once the restriction is lifted
43+
run: |
44+
set +e
45+
root="$(npm root -g)/@openai/codex"
46+
bw="$(find "$root" -type f -name "*bwrap*" | head -1)"
47+
echo "vendored bwrap: ${bw:-none found}"
48+
[ -n "$bw" ] || exit 0
49+
chmod +x "$bw"
50+
echo "=== restriction ON (the current state) ==="
51+
sysctl kernel.apparmor_restrict_unprivileged_userns
52+
"$bw" --unshare-all --dev-bind / / true; echo "exit=$?"
53+
echo "=== restriction OFF ==="
54+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
55+
"$bw" --unshare-all --dev-bind / / true; echo "exit=$?"
56+
echo "=== and a real command inside it ==="
57+
"$bw" --unshare-all --dev-bind / / pwd; echo "exit=$?"

0 commit comments

Comments
 (0)