Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

fix(container): support Codex 0.156.1 with Bubblewrap (#997)

dependabot[bot]ccf5a3f92d0e
diff --git a/.github/workflows/container-ci.yml b/.github/workflows/container-ci.yml
index 7b4b74692..011bb1f7c 100644
--- a/.github/workflows/container-ci.yml
+++ b/.github/workflows/container-ci.yml
@@ -134,28 +134,7 @@ jobs:
run: docker compose -f compose.yaml -f compose.apparmor.yaml config --quiet
- name: Verify hardened Codex command sandbox
- shell: bash
- run: |
- set -euo pipefail
- command=(
- docker run --rm
- --cap-drop ALL
- --security-opt no-new-privileges
- --security-opt "seccomp=$GITHUB_WORKSPACE/docker/codex-security-seccomp.json"
- --entrypoint node
- codex-security:ci
- /usr/local/lib/node_modules/@openai/codex-security/node_modules/@openai/codex/bin/codex.js
- )
-
- if output="$("${command[@]}" sandbox /usr/bin/true 2>&1)"; then
- printf '%s\n' "$output"
- elif grep -Eq 'bwrap: (Failed to make / slave: Permission denied|loopback: Failed RTM_NEW(ADDR|LINK): Operation not permitted|setting up uid map: Permission denied|No permissions to create a new namespace)' <<< "$output"; then
- echo '::notice::This Docker host blocks nested Bubblewrap namespaces; verifying the supported Landlock fallback.'
- "${command[@]}" sandbox --enable use_legacy_landlock /usr/bin/true
- else
- printf 'The hardened Codex sandbox failed unexpectedly:\n%s\n' "$output" >&2
- exit 1
- fi
+ run: bash docker/verify-container-sandbox.sh codex-security:ci
- name: Reject interactive repository discovery
shell: bash
diff --git a/.github/workflows/container-validate.yml b/.github/workflows/container-validate.yml
index f7e6be9cc..8580c830e 100644
--- a/.github/workflows/container-validate.yml
+++ b/.github/workflows/container-validate.yml
@@ -61,7 +61,7 @@ jobs:
docker run --rm codex-security:release-candidate info --json
[[ "$(docker run --rm --entrypoint id codex-security:release-candidate -u)" == 10001 ]]
- - name: Verify host-aware AppArmor sandbox selection
+ - name: Verify entrypoint preserves Codex sandbox settings
shell: bash
run: |
set -euo pipefail
@@ -76,49 +76,12 @@ jobs:
/usr/local/bin/codex-security-entrypoint \
bulk-scan /input/repositories.csv --output-dir /output
)"
- restricted_user_namespaces=
- if [ -r /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]; then
- IFS= read -r restricted_user_namespaces \
- < /proc/sys/kernel/apparmor_restrict_unprivileged_userns || true
- fi
-
- apparmor_profile=
- if [ -r /proc/self/attr/current ]; then
- IFS= read -r apparmor_profile < /proc/self/attr/current || true
- fi
-
- if [ "$restricted_user_namespaces" = 1 ] &&
- [ "$apparmor_profile" != "codex-security-container (enforce)" ]; then
- printf "%s\\n" "$actual" | grep -Fxq features.use_legacy_landlock=true
- elif printf "%s\\n" "$actual" | grep -Fxq features.use_legacy_landlock=true; then
- printf "%s\\n" "Landlock must not be forced when the preferred sandbox is available." >&2
- exit 1
- fi
+ expected="$(printf "%s\\n" bulk-scan /input/repositories.csv --output-dir /output)"
+ test "$actual" = "$expected"
'
- name: Verify hardened Codex command sandbox
- shell: bash
- run: |
- set -euo pipefail
- command=(
- docker run --rm
- --cap-drop ALL
- --security-opt no-new-privileges
- --security-opt "seccomp=$GITHUB_WORKSPACE/docker/codex-security-seccomp.json"
- --entrypoint node
- codex-security:release-candidate
- /usr/local/lib/node_modules/@openai/codex-security/node_modules/@openai/codex/bin/codex.js
- )
-
- if output="$("${command[@]}" sandbox /usr/bin/true 2>&1)"; then
- printf '%s\n' "$output"
- elif grep -Eq 'bwrap: (Failed to make / slave: Permission denied|loopback: Failed RTM_NEW(ADDR|LINK): Operation not permitted|setting up uid map: Permission denied|No permissions to create a new namespace)' <<< "$output"; then
- echo '::notice::This Docker host blocks nested Bubblewrap namespaces; verifying the supported Landlock fallback.'
- "${command[@]}" sandbox --enable use_legacy_landlock /usr/bin/true
- else
- printf 'The hardened Codex sandbox failed unexpectedly:\n%s\n' "$output" >&2
- exit 1
- fi
+ run: bash docker/verify-container-sandbox.sh codex-security:release-candidate
- name: Verify host-scoped Git credentials
shell: bash
@@ -154,7 +117,7 @@ jobs:
exit 1
fi
- - name: Verify optional hardened AppArmor Compose override
+ - name: Verify hardened AppArmor Compose override
env:
CODEX_SECURITY_IMAGE: codex-security:release-candidate
shell: bash
@@ -178,9 +141,6 @@ jobs:
exit 0
fi
- sudo install -m 0644 docker/codex-security.apparmor \
- /etc/apparmor.d/codex-security-container
- sudo apparmor_parser -r -W /etc/apparmor.d/codex-security-container
sudo grep -Fxq 'codex-security-container (enforce)' \
/sys/kernel/security/apparmor/profiles
diff --git a/docker/README.md b/docker/README.md
index 4517b6f06..2dc89a0b6 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -221,10 +221,11 @@ no-new-privileges, and seccomp profile. It does not override Codex approval or
filesystem settings. On hosts that restrict nested user namespaces, install the
existing [AppArmor profile](../sdk/typescript/README.md#containerized-bulk-scans)
and append `-f compose.apparmor.yaml` to the runner Compose commands. This override
-works because both examples use the `codex-security` service name. The entrypoint's
-bulk-scan-specific Landlock selection remains unchanged; it is not applied to
-other commands. Source inspection needs a host that supports the selected Codex
-sandbox; do not disable sandboxing to work around host restrictions.
+works because both examples use the `codex-security` service name. Codex 0.156.1
+requires Bubblewrap for filesystem-restricted execution; the legacy Landlock
+fallback is no longer supported. The entrypoint preserves Codex sandbox settings.
+Source inspection needs a host that supports Bubblewrap; do not disable sandboxing
+to work around host restrictions.
`run --rm` removes only the finished runner container. Preserve its host mounts
for later stages and retries; use the same image version and source paths.
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index a8ca4894e..fbaca7c41 100644
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -60,53 +60,6 @@ if [ "$bulk_scan_command" = yes ] && [ "$bulk_scan_metadata" != yes ]; then
printf '%s\n' 'codex-security: bulk-scan requires a repository CSV; interactive discovery is not supported in this image.' >&2
exit 2
;;
- *)
- if [ -r /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]; then
- restricted_user_namespaces=
- IFS= read -r restricted_user_namespaces < /proc/sys/kernel/apparmor_restrict_unprivileged_userns ||
- true
- if [ "$restricted_user_namespaces" = 1 ]; then
- apparmor_profile=
- if [ -r /proc/self/attr/current ]; then
- IFS= read -r apparmor_profile < /proc/self/attr/current || true
- fi
- if [ "$apparmor_profile" != 'codex-security-container (enforce)' ]; then
- landlock_override=
- expects_codex_override=
- for argument do
- if [ "$expects_codex_override" = yes ]; then
- case "$argument" in
- features.use_legacy_landlock=true)
- landlock_override=enabled
- ;;
- features.use_legacy_landlock=*)
- printf '%s\n' 'codex-security: restricted Ubuntu hosts require --codex features.use_legacy_landlock=true.' >&2
- exit 2
- ;;
- esac
- expects_codex_override=
- elif [ "$argument" = --codex ]; then
- expects_codex_override=yes
- else
- case "$argument" in
- --codex=features.use_legacy_landlock=true)
- landlock_override=enabled
- ;;
- --codex=features.use_legacy_landlock=*)
- printf '%s\n' 'codex-security: restricted Ubuntu hosts require --codex features.use_legacy_landlock=true.' >&2
- exit 2
- ;;
- esac
- fi
- done
-
- if [ "$landlock_override" != enabled ]; then
- set -- "$@" --codex features.use_legacy_landlock=true
- fi
- fi
- fi
- fi
- ;;
esac
fi
diff --git a/docker/verify-container-sandbox.sh b/docker/verify-container-sandbox.sh
new file mode 100644
index 000000000..de59c343d
--- /dev/null
+++ b/docker/verify-container-sandbox.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+image=${1:?Usage: verify-container-sandbox.sh IMAGE}
+repository_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
+apparmor_options=()
+
+if docker info --format '{{json .SecurityOptions}}' | grep -Fq '"name=apparmor"'; then
+ sudo install -m 0644 "$repository_root/docker/codex-security.apparmor" \
+ /etc/apparmor.d/codex-security-container
+ sudo apparmor_parser -r -W /etc/apparmor.d/codex-security-container
+ sudo grep -Fxq 'codex-security-container (enforce)' \
+ /sys/kernel/security/apparmor/profiles
+ apparmor_options=(--security-opt apparmor=codex-security-container)
+ printf '%s\n' 'COMPOSE_FILE=compose.yaml:compose.apparmor.yaml' >> "$GITHUB_ENV"
+fi
+
+docker run --rm \
+ --cap-drop ALL \
+ --security-opt no-new-privileges \
+ --security-opt "seccomp=$repository_root/docker/codex-security-seccomp.json" \
+ "${apparmor_options[@]}" \
+ --entrypoint node \
+ "$image" \
+ /usr/local/lib/node_modules/@openai/codex-security/node_modules/@openai/codex/bin/codex.js \
+ sandbox /usr/bin/true
diff --git a/plugins/codex-security/mcp-app/package.json b/plugins/codex-security/mcp-app/package.json
index 6e8548bcb..74ca72065 100644
--- a/plugins/codex-security/mcp-app/package.json
+++ b/plugins/codex-security/mcp-app/package.json
@@ -11,7 +11,7 @@
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.30.0",
- "@openai/codex-sdk": "0.155.0",
+ "@openai/codex-sdk": "0.156.1",
"smol-toml": "1.8.0",
"zod": "^4.6.2"
},
diff --git a/plugins/codex-security/mcp-app/pnpm-lock.yaml b/plugins/codex-security/mcp-app/pnpm-lock.yaml
index dbb0b3bd7..1f5fb59a1 100644
--- a/plugins/codex-security/mcp-app/pnpm-lock.yaml
+++ b/plugins/codex-security/mcp-app/pnpm-lock.yaml
@@ -12,8 +12,8 @@ importers:
specifier: ^1.30.0
version: 1.30.0([email protected])
'@openai/codex-sdk':
- specifier: 0.155.0
- version: 0.155.0
+ specifier: 0.156.1
+ version: 0.156.1
smol-toml:
specifier: 1.8.0
version: 1.8.0
@@ -208,47 +208,47 @@ packages:
'@cfworker/json-schema':
optional: true
- '@openai/[email protected]':
- resolution: {integrity: sha512-oD/7iCZnXqDlrnoWWpGkZExrUStpAau1koyUO/fSW3WwkqewRf+MGj3OS41Buw7gNwj0oM6ilI9RHqP5QQWJaQ==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-t1GNPYrSIjHGfBKZ+9pbjOS/by0tMwVe+27fHsMO3RHl9QLIc7dB8XYR954iZ6HpF4EAjZs0melT0mPXF03jVg==}
engines: {node: '>=18'}
- '@openai/[email protected]':
- resolution: {integrity: sha512-35a85Hbwy9WXkDTJumLjTcmMgpR7BMdrTloWBVGjoA+FBCh7jb3+cYp2W+3U4klqGAjAskoIvQZv7/eedmCjHA==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-nI1iVl/n2SO2lSvlwEsJx63zdSI4C4Me2gR7AG0OWMJiGSakz2tY2hx43E39Zq5aEoeB5bZjJXzp5Sqhog6vyA==}
engines: {node: '>=16'}
hasBin: true
- '@openai/[email protected]':
- resolution: {integrity: sha512-c0vbt2ZS6XiXq9gQkNictu7PH0deMyq/bw4Ia9bdihU1iJHuGuwC5vD4swU4xhLUKoTs4tMOHwYWKaofFZcVRg==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-Jg6wbdV+wmMZczhwE74GSxOYEZlViKXn6KyCw/yfrz3PAKFD14xljuPopmdhWC1+8IKU2WdN5fdmXNPt2q4HPA==}
engines: {node: '>=16'}
cpu: [arm64]
os: [darwin]
- '@openai/[email protected]':
- resolution: {integrity: sha512-Epo33vwukf4uPyxg1c7+7+P4J6YgggdwQrCR/BRGuhjpadZAzoAntfm54CPCNHvW6uSq8BHQX/e9G+f5/0XQ7Q==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-BVjqNOoltWrnNUrgMRepvDIIBmd4XY+ikAE4pYVHlrwiizNlEWQuCQOTrFMJKp54LFRG8jDTjLZyYQ1QrliuOg==}
engines: {node: '>=16'}
cpu: [x64]
os: [darwin]
- '@openai/[email protected]':
- resolution: {integrity: sha512-iMyMjIYHlBUUDeTEGeEftQozQz0h7nYYCaLDJlZnqDF2Y0+bfdD/ppDS3vsw6mIz/z49haC6TCer11iEWO6fsA==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-sTEHk31C12dqzJdjZ2u9KLFCXKL04KyCM+QheSjdQI8uzmVJS7aEF2/qAqFxXwk/jwMzC9u7IihfoIlAGR6YsA==}
engines: {node: '>=16'}
cpu: [arm64]
os: [linux]
- '@openai/[email protected]':
- resolution: {integrity: sha512-CiXkVTy4ERdFSXXP8n98/iOyVUCOYFPQ8cuwgeOEEbLhe1LnlQbgH/H8ZeuxO9WXKIZLJg0x626UgR9axY2zSA==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-2ePo0wgOcnONKsuzp8vBjOmNY+IdsKaouaDDIdiKq9HOWNuV/GI22OeXft2A/1GaoL71ictO0/pLAsCEnQ6wew==}
engines: {node: '>=16'}
cpu: [x64]
os: [linux]
- '@openai/[email protected]':
- resolution: {integrity: sha512-aFIONQhKxg+XEVsInLRI2OG8S9OUvfK+nzc4sWcbn8DgxlmuPkbVzloSrD5psh1lKnG4s2qd3QK8tCClSgLzJw==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-e5DsyOHlKWulTBz/neIczpcYLQDqtaLtBj2lgncOgeQw5mlAQVZHlGvKsoKVcEPUKLb8opIMJBxXi6cz3JJ4hg==}
engines: {node: '>=16'}
cpu: [arm64]
os: [win32]
- '@openai/[email protected]':
- resolution: {integrity: sha512-yfB9DHAB0YLTy3oD4one21pzGIJ99b+U/PW4htAq6OLccPSZa8OZz5HeN3XVy1a2/BbCqwWmK+w4p/aG/3DCRw==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-MJyLxbBs2zzp5kbaR/99Zwe7SmbrwUkveTcT+ayYlO48V0nYh0eU+h2lalBwvC7VJ/ya/bXnUtISJfJKhGCD/g==}
engines: {node: '>=16'}
cpu: [x64]
os: [win32]
@@ -858,35 +858,35 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@openai/[email protected]':
+ '@openai/[email protected]':
dependencies:
- '@openai/codex': 0.155.0
+ '@openai/codex': 0.156.1
- '@openai/[email protected]':
+ '@openai/[email protected]':
optionalDependencies:
- '@openai/codex-darwin-arm64': '@openai/[email protected]'
- '@openai/codex-darwin-x64': '@openai/[email protected]'
- '@openai/codex-linux-arm64': '@openai/[email protected]'
- '@openai/codex-linux-x64': '@openai/[email protected]'
- '@openai/codex-win32-arm64': '@openai/[email protected]'
- '@openai/codex-win32-x64': '@openai/[email protected]'
-
- '@openai/[email protected]':
+ '@openai/codex-darwin-arm64': '@openai/[email protected]'
+ '@openai/codex-darwin-x64': '@openai/[email protected]'
+ '@openai/codex-linux-arm64': '@openai/[email protected]'
+ '@openai/codex-linux-x64': '@openai/[email protected]'
+ '@openai/codex-win32-arm64': '@openai/[email protected]'
+ '@openai/codex-win32-x64': '@openai/[email protected]'
+
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
diff --git a/plugins/codex-security/skills/triage-finding/evals/package.json b/plugins/codex-security/skills/triage-finding/evals/package.json
index 304fbe110..184826dca 100644
--- a/plugins/codex-security/skills/triage-finding/evals/package.json
+++ b/plugins/codex-security/skills/triage-finding/evals/package.json
@@ -30,7 +30,7 @@
"pf:view": "PROMPTFOO_CONFIG_DIR=.promptfoo PROMPTFOO_DISABLE_WAL_MODE=true promptfoo view"
},
"dependencies": {
- "@openai/codex-sdk": "0.155.0",
+ "@openai/codex-sdk": "0.156.1",
"@opencode-ai/sdk": "1.18.31",
"promptfoo": "0.123.0"
}
diff --git a/plugins/codex-security/skills/triage-finding/evals/pnpm-lock.yaml b/plugins/codex-security/skills/triage-finding/evals/pnpm-lock.yaml
index e3bda75ad..58cfbf806 100644
--- a/plugins/codex-security/skills/triage-finding/evals/pnpm-lock.yaml
+++ b/plugins/codex-security/skills/triage-finding/evals/pnpm-lock.yaml
@@ -6,8 +6,8 @@ settings:
overrides:
'@huggingface/[email protected]>sharp': 0.35.4
- '@openai/codex': 0.155.0
- '@openai/codex-sdk': 0.155.0
+ '@openai/codex': 0.156.1
+ '@openai/codex-sdk': 0.156.1
'@opencode-ai/sdk': 1.18.31
[email protected]>adm-zip: 0.6.0
@@ -16,8 +16,8 @@ importers:
.:
dependencies:
'@openai/codex-sdk':
- specifier: 0.155.0
- version: 0.155.0
+ specifier: 0.156.1
+ version: 0.156.1
'@opencode-ai/sdk':
specifier: 1.18.31
version: 1.18.31
@@ -1232,8 +1232,8 @@ packages:
peerDependencies:
zod: ^4.0.0
- '@openai/[email protected]':
- resolution: {integrity: sha512-oD/7iCZnXqDlrnoWWpGkZExrUStpAau1koyUO/fSW3WwkqewRf+MGj3OS41Buw7gNwj0oM6ilI9RHqP5QQWJaQ==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-t1GNPYrSIjHGfBKZ+9pbjOS/by0tMwVe+27fHsMO3RHl9QLIc7dB8XYR954iZ6HpF4EAjZs0melT0mPXF03jVg==}
engines: {node: '>=18'}
'@openai/[email protected]':
@@ -1241,43 +1241,43 @@ packages:
engines: {node: ^22.13.0 || ^24.0.0 || ^26.0.0}
hasBin: true
- '@openai/[email protected]':
- resolution: {integrity: sha512-35a85Hbwy9WXkDTJumLjTcmMgpR7BMdrTloWBVGjoA+FBCh7jb3+cYp2W+3U4klqGAjAskoIvQZv7/eedmCjHA==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-nI1iVl/n2SO2lSvlwEsJx63zdSI4C4Me2gR7AG0OWMJiGSakz2tY2hx43E39Zq5aEoeB5bZjJXzp5Sqhog6vyA==}
engines: {node: '>=16'}
hasBin: true
- '@openai/[email protected]':
- resolution: {integrity: sha512-c0vbt2ZS6XiXq9gQkNictu7PH0deMyq/bw4Ia9bdihU1iJHuGuwC5vD4swU4xhLUKoTs4tMOHwYWKaofFZcVRg==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-Jg6wbdV+wmMZczhwE74GSxOYEZlViKXn6KyCw/yfrz3PAKFD14xljuPopmdhWC1+8IKU2WdN5fdmXNPt2q4HPA==}
engines: {node: '>=16'}
cpu: [arm64]
os: [darwin]
- '@openai/[email protected]':
- resolution: {integrity: sha512-Epo33vwukf4uPyxg1c7+7+P4J6YgggdwQrCR/BRGuhjpadZAzoAntfm54CPCNHvW6uSq8BHQX/e9G+f5/0XQ7Q==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-BVjqNOoltWrnNUrgMRepvDIIBmd4XY+ikAE4pYVHlrwiizNlEWQuCQOTrFMJKp54LFRG8jDTjLZyYQ1QrliuOg==}
engines: {node: '>=16'}
cpu: [x64]
os: [darwin]
- '@openai/[email protected]':
- resolution: {integrity: sha512-iMyMjIYHlBUUDeTEGeEftQozQz0h7nYYCaLDJlZnqDF2Y0+bfdD/ppDS3vsw6mIz/z49haC6TCer11iEWO6fsA==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-sTEHk31C12dqzJdjZ2u9KLFCXKL04KyCM+QheSjdQI8uzmVJS7aEF2/qAqFxXwk/jwMzC9u7IihfoIlAGR6YsA==}
engines: {node: '>=16'}
cpu: [arm64]
os: [linux]
- '@openai/[email protected]':
- resolution: {integrity: sha512-CiXkVTy4ERdFSXXP8n98/iOyVUCOYFPQ8cuwgeOEEbLhe1LnlQbgH/H8ZeuxO9WXKIZLJg0x626UgR9axY2zSA==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-2ePo0wgOcnONKsuzp8vBjOmNY+IdsKaouaDDIdiKq9HOWNuV/GI22OeXft2A/1GaoL71ictO0/pLAsCEnQ6wew==}
engines: {node: '>=16'}
cpu: [x64]
os: [linux]
- '@openai/[email protected]':
- resolution: {integrity: sha512-aFIONQhKxg+XEVsInLRI2OG8S9OUvfK+nzc4sWcbn8DgxlmuPkbVzloSrD5psh1lKnG4s2qd3QK8tCClSgLzJw==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-e5DsyOHlKWulTBz/neIczpcYLQDqtaLtBj2lgncOgeQw5mlAQVZHlGvKsoKVcEPUKLb8opIMJBxXi6cz3JJ4hg==}
engines: {node: '>=16'}
cpu: [arm64]
os: [win32]
- '@openai/[email protected]':
- resolution: {integrity: sha512-yfB9DHAB0YLTy3oD4one21pzGIJ99b+U/PW4htAq6OLccPSZa8OZz5HeN3XVy1a2/BbCqwWmK+w4p/aG/3DCRw==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-MJyLxbBs2zzp5kbaR/99Zwe7SmbrwUkveTcT+ayYlO48V0nYh0eU+h2lalBwvC7VJ/ya/bXnUtISJfJKhGCD/g==}
engines: {node: '>=16'}
cpu: [x64]
os: [win32]
@@ -5589,17 +5589,17 @@ snapshots:
- ws
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
dependencies:
- '@openai/codex': 0.155.0
+ '@openai/codex': 0.156.1
dependencies:
'@inquirer/prompts': 8.3.0(@types/[email protected])
'@linear/sdk': 89.0.0([email protected])
'@octokit/core': 7.0.6
- '@openai/codex': 0.155.0
- '@openai/codex-sdk': 0.155.0
+ '@openai/codex': 0.156.1
+ '@openai/codex-sdk': 0.156.1
ajv: 8.20.0
extract-zip: 2.0.1
fast-uri: 3.1.6
@@ -5622,31 +5622,31 @@ snapshots:
- utf-8-validate
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optionalDependencies:
- '@openai/codex-darwin-arm64': '@openai/[email protected]'
- '@openai/codex-darwin-x64': '@openai/[email protected]'
- '@openai/codex-linux-arm64': '@openai/[email protected]'
- '@openai/codex-linux-x64': '@openai/[email protected]'
- '@openai/codex-win32-arm64': '@openai/[email protected]'
- '@openai/codex-win32-x64': '@openai/[email protected]'
+ '@openai/codex-darwin-arm64': '@openai/[email protected]'
+ '@openai/codex-darwin-x64': '@openai/[email protected]'
+ '@openai/codex-linux-arm64': '@openai/[email protected]'
+ '@openai/codex-linux-x64': '@openai/[email protected]'
+ '@openai/codex-win32-arm64': '@openai/[email protected]'
+ '@openai/codex-win32-x64': '@openai/[email protected]'
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
'@opencode-ai/[email protected]':
@@ -8146,7 +8146,7 @@ snapshots:
'@langfuse/client': 5.11.0(@opentelemetry/[email protected])
'@modelcontextprotocol/sdk': 1.30.0(@cfworker/[email protected])([email protected])
'@openai/agents': 0.11.8(@aws-sdk/[email protected])(@cfworker/[email protected])(@smithy/[email protected])([email protected])([email protected])
- '@openai/codex-sdk': 0.155.0
+ '@openai/codex-sdk': 0.156.1
'@openai/codex-security': 0.1.27(@types/[email protected])([email protected])
'@opencode-ai/sdk': 1.18.31
'@playwright/browser-chromium': 1.62.1
diff --git a/sdk/typescript/README.md b/sdk/typescript/README.md
index 7579096fb..923e4bb5a 100644
--- a/sdk/typescript/README.md
+++ b/sdk/typescript/README.md
@@ -2542,8 +2542,9 @@ Compose accepts `CODEX_SECURITY_IMAGE`, `CODEX_SECURITY_USER`,
`CODEX_SECURITY_SECCOMP`, `CODEX_SECURITY_CSV`, `CODEX_SECURITY_RESULTS`, and
`CODEX_SECURITY_STATE` for the image, user, seccomp profile, and mounts.
+Codex 0.156.1 requires Bubblewrap for filesystem-restricted execution on Linux.
On Ubuntu hosts that restrict unprivileged user namespaces, an administrator
-can install the optional AppArmor profile:
+must install the AppArmor profile and use the Compose override:
```bash
sudo install -m 0644 docker/codex-security.apparmor /etc/apparmor.d/codex-security-container
@@ -2552,7 +2553,9 @@ docker compose -f compose.yaml -f compose.apparmor.yaml run --rm codex-security
```
The override keeps the nonroot user, dropped capabilities, no-new-privileges,
-and seccomp policy. Other Docker hosts don't need it.
+and seccomp policy. It enables the nested namespaces required by Bubblewrap.
+The legacy Landlock fallback is no longer supported for these scans. Other
+Docker hosts that permit nested user namespaces do not need this override.
## Local security model
diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json
index 007311839..68b267203 100644
--- a/sdk/typescript/package.json
+++ b/sdk/typescript/package.json
@@ -74,8 +74,8 @@
"@inquirer/prompts": "8.7.2",
"@linear/sdk": "95.0.0",
"@octokit/core": "7.0.8",
- "@openai/codex": "0.155.0",
- "@openai/codex-sdk": "0.155.0",
+ "@openai/codex": "0.156.1",
+ "@openai/codex-sdk": "0.156.1",
"ajv": "8.20.0",
"extract-zip": "2.0.1",
"fflate": "0.8.3",
diff --git a/sdk/typescript/pnpm-lock.yaml b/sdk/typescript/pnpm-lock.yaml
index bb67f9896..caa4e0421 100644
--- a/sdk/typescript/pnpm-lock.yaml
+++ b/sdk/typescript/pnpm-lock.yaml
@@ -20,11 +20,11 @@ importers:
specifier: 7.0.8
version: 7.0.8
'@openai/codex':
- specifier: 0.155.0
- version: 0.155.0
+ specifier: 0.156.1
+ version: 0.156.1
'@openai/codex-sdk':
- specifier: 0.155.0
- version: 0.155.0
+ specifier: 0.156.1
+ version: 0.156.1
ajv:
specifier: 8.20.0
version: 8.20.0
@@ -783,47 +783,47 @@ packages:
react: ^18.0.0 || ^19.0.0
tailwindcss: ^4.0.10
- '@openai/[email protected]':
- resolution: {integrity: sha512-oD/7iCZnXqDlrnoWWpGkZExrUStpAau1koyUO/fSW3WwkqewRf+MGj3OS41Buw7gNwj0oM6ilI9RHqP5QQWJaQ==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-t1GNPYrSIjHGfBKZ+9pbjOS/by0tMwVe+27fHsMO3RHl9QLIc7dB8XYR954iZ6HpF4EAjZs0melT0mPXF03jVg==}
engines: {node: '>=18'}
- '@openai/[email protected]':
- resolution: {integrity: sha512-35a85Hbwy9WXkDTJumLjTcmMgpR7BMdrTloWBVGjoA+FBCh7jb3+cYp2W+3U4klqGAjAskoIvQZv7/eedmCjHA==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-nI1iVl/n2SO2lSvlwEsJx63zdSI4C4Me2gR7AG0OWMJiGSakz2tY2hx43E39Zq5aEoeB5bZjJXzp5Sqhog6vyA==}
engines: {node: '>=16'}
hasBin: true
- '@openai/[email protected]':
- resolution: {integrity: sha512-c0vbt2ZS6XiXq9gQkNictu7PH0deMyq/bw4Ia9bdihU1iJHuGuwC5vD4swU4xhLUKoTs4tMOHwYWKaofFZcVRg==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-Jg6wbdV+wmMZczhwE74GSxOYEZlViKXn6KyCw/yfrz3PAKFD14xljuPopmdhWC1+8IKU2WdN5fdmXNPt2q4HPA==}
engines: {node: '>=16'}
cpu: [arm64]
os: [darwin]
- '@openai/[email protected]':
- resolution: {integrity: sha512-Epo33vwukf4uPyxg1c7+7+P4J6YgggdwQrCR/BRGuhjpadZAzoAntfm54CPCNHvW6uSq8BHQX/e9G+f5/0XQ7Q==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-BVjqNOoltWrnNUrgMRepvDIIBmd4XY+ikAE4pYVHlrwiizNlEWQuCQOTrFMJKp54LFRG8jDTjLZyYQ1QrliuOg==}
engines: {node: '>=16'}
cpu: [x64]
os: [darwin]
- '@openai/[email protected]':
- resolution: {integrity: sha512-iMyMjIYHlBUUDeTEGeEftQozQz0h7nYYCaLDJlZnqDF2Y0+bfdD/ppDS3vsw6mIz/z49haC6TCer11iEWO6fsA==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-sTEHk31C12dqzJdjZ2u9KLFCXKL04KyCM+QheSjdQI8uzmVJS7aEF2/qAqFxXwk/jwMzC9u7IihfoIlAGR6YsA==}
engines: {node: '>=16'}
cpu: [arm64]
os: [linux]
- '@openai/[email protected]':
- resolution: {integrity: sha512-CiXkVTy4ERdFSXXP8n98/iOyVUCOYFPQ8cuwgeOEEbLhe1LnlQbgH/H8ZeuxO9WXKIZLJg0x626UgR9axY2zSA==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-2ePo0wgOcnONKsuzp8vBjOmNY+IdsKaouaDDIdiKq9HOWNuV/GI22OeXft2A/1GaoL71ictO0/pLAsCEnQ6wew==}
engines: {node: '>=16'}
cpu: [x64]
os: [linux]
- '@openai/[email protected]':
- resolution: {integrity: sha512-aFIONQhKxg+XEVsInLRI2OG8S9OUvfK+nzc4sWcbn8DgxlmuPkbVzloSrD5psh1lKnG4s2qd3QK8tCClSgLzJw==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-e5DsyOHlKWulTBz/neIczpcYLQDqtaLtBj2lgncOgeQw5mlAQVZHlGvKsoKVcEPUKLb8opIMJBxXi6cz3JJ4hg==}
engines: {node: '>=16'}
cpu: [arm64]
os: [win32]
- '@openai/[email protected]':
- resolution: {integrity: sha512-yfB9DHAB0YLTy3oD4one21pzGIJ99b+U/PW4htAq6OLccPSZa8OZz5HeN3XVy1a2/BbCqwWmK+w4p/aG/3DCRw==}
+ '@openai/[email protected]':
+ resolution: {integrity: sha512-MJyLxbBs2zzp5kbaR/99Zwe7SmbrwUkveTcT+ayYlO48V0nYh0eU+h2lalBwvC7VJ/ya/bXnUtISJfJKhGCD/g==}
engines: {node: '>=16'}
cpu: [x64]
os: [win32]
@@ -3750,35 +3750,35 @@ snapshots:
- react-dom
- supports-color
- '@openai/[email protected]':
+ '@openai/[email protected]':
dependencies:
- '@openai/codex': 0.155.0
+ '@openai/codex': 0.156.1
- '@openai/[email protected]':
+ '@openai/[email protected]':
optionalDependencies:
- '@openai/codex-darwin-arm64': '@openai/[email protected]'
- '@openai/codex-darwin-x64': '@openai/[email protected]'
- '@openai/codex-linux-arm64': '@openai/[email protected]'
- '@openai/codex-linux-x64': '@openai/[email protected]'
- '@openai/codex-win32-arm64': '@openai/[email protected]'
- '@openai/codex-win32-x64': '@openai/[email protected]'
-
- '@openai/[email protected]':
+ '@openai/codex-darwin-arm64': '@openai/[email protected]'
+ '@openai/codex-darwin-x64': '@openai/[email protected]'
+ '@openai/codex-linux-arm64': '@openai/[email protected]'
+ '@openai/codex-linux-x64': '@openai/[email protected]'
+ '@openai/codex-win32-arm64': '@openai/[email protected]'
+ '@openai/codex-win32-x64': '@openai/[email protected]'
+
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
- '@openai/[email protected]':
+ '@openai/[email protected]':
optional: true
'@radix-ui/[email protected]': {}
diff --git a/sdk/typescript/tests-ts/container-entrypoint.test.ts b/sdk/typescript/tests-ts/container-entrypoint.test.ts
index ff25a177a..3d98c9706 100644
--- a/sdk/typescript/tests-ts/container-entrypoint.test.ts
+++ b/sdk/typescript/tests-ts/container-entrypoint.test.ts
@@ -1,5 +1,5 @@
import { spawnSync, type SpawnSyncReturns } from "node:child_process";
-import { existsSync, readFileSync } from "node:fs";
+import { existsSync } from "node:fs";
import { mkdtemp, realpath, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { delimiter, join } from "node:path";
@@ -34,29 +34,6 @@ const versionVerifier = existsSync(publicVersionVerifier)
"docker",
"verify-container-release-version.sh",
);
-const appArmorRestrictsUserNamespaces = (() => {
- try {
- return (
- readFileSync(
- "/proc/sys/kernel/apparmor_restrict_unprivileged_userns",
- "utf8",
- ).trim() === "1"
- );
- } catch {
- return false;
- }
-})();
-const usesCodexSecurityAppArmorProfile = (() => {
- try {
- return (
- readFileSync("/proc/self/attr/current", "utf8").trim() ===
- "codex-security-container (enforce)"
- );
- } catch {
- return false;
- }
-})();
-
async function runEntrypoint(
args: readonly string[],
overrides: Record<string, string> = {},
@@ -135,7 +112,7 @@ async function runVersionVerifier(
describe("customer container entrypoint", () => {
testPosix(
- "preserves CSV scan arguments and selects Landlock only without the AppArmor profile",
+ "preserves CSV scan arguments without selecting the legacy sandbox",
async () => {
const result = await runEntrypoint([
"bulk-scan",
@@ -156,10 +133,6 @@ describe("customer container entrypoint", () => {
"/output",
"--workers",
"2",
- ...(appArmorRestrictsUserNamespaces &&
- !usesCodexSecurityAppArmorProfile
- ? ["--codex", "features.use_legacy_landlock=true"]
- : []),
"",
].join("\n"),
);
@@ -182,16 +155,7 @@ describe("customer container entrypoint", () => {
const result = await runEntrypoint(arguments_);
expect(result.status).toBe(0);
expect(result.stderr).toBe("");
- expect(result.stdout).toBe(
- [
- ...arguments_,
- ...(appArmorRestrictsUserNamespaces &&
- !usesCodexSecurityAppArmorProfile
- ? ["--codex", "features.use_legacy_landlock=true"]
- : []),
- "",
- ].join("\n"),
- );
+ expect(result.stdout).toBe([...arguments_, ""].join("\n"));
}
});
@@ -206,54 +170,21 @@ describe("customer container entrypoint", () => {
},
);
- testPosix(
- "preserves an explicit Landlock override without duplicating it",
- async () => {
- const arguments_ = [
- "bulk-scan",
- "/input/repositories.csv",
- "--output-dir",
- "/output",
- "--codex",
- "features.use_legacy_landlock=true",
- ];
- const result = await runEntrypoint(arguments_);
+ testPosix("preserves explicit Codex sandbox settings", async () => {
+ const arguments_ = [
+ "bulk-scan",
+ "/input/repositories.csv",
+ "--output-dir",
+ "/output",
+ "--codex",
+ "features.use_legacy_landlock=false",
+ ];
+ const result = await runEntrypoint(arguments_);
- expect(result.status).toBe(0);
- expect(result.stderr).toBe("");
- expect(result.stdout).toBe(`${arguments_.join("\n")}\n`);
- },
- );
-
- testPosix(
- "rejects incompatible Landlock overrides only on restricted hosts",
- async () => {
- const arguments_ = [
- "bulk-scan",
- "/input/repositories.csv",
- "--output-dir",
- "/output",
- "--codex",
- "features.use_legacy_landlock=false",
- ];
- const result = await runEntrypoint(arguments_);
-
- if (
- appArmorRestrictsUserNamespaces &&
- !usesCodexSecurityAppArmorProfile
- ) {
- expect(result.status).toBe(2);
- expect(result.stdout).toBe("");
- expect(result.stderr).toBe(
- "codex-security: restricted Ubuntu hosts require --codex features.use_legacy_landlock=true.\n",
- );
- } else {
- expect(result.status).toBe(0);
- expect(result.stderr).toBe("");
- expect(result.stdout).toBe(`${arguments_.join("\n")}\n`);
- }
- },
- );
+ expect(result.status).toBe(0);
+ expect(result.stderr).toBe("");
+ expect(result.stdout).toBe(`${arguments_.join("\n")}\n`);
+ });
testPosix(
"rejects interactive discovery before starting the CLI",