Repository navigation
Conversation
On Ubuntu 26.04 /usr/bin/test is the uutils one, whose -w reads only the mode bits, so after setfacl -m u:runner:--- it still reported the socket as writable and drop-sudo stopped with "Could not restrict access to /run/dbus/system_bus_socket". The dash builtin asks the kernel (faccessat), which applies the ACL. The test helpers that made the same check get the same change, and dist/main.js is rebuilt. Fixes openai#188.
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Author
|
I have read the CLA Document and I hereby sign the CLA |
1 of 4 tasks
Stephan202
pushed a commit
to PicnicSupermarket/error-prone-support
that referenced
this pull request
Nov 11, 2026
On `ubuntu-26.04` the `openai/codex-action` `drop-sudo` step fails, as that image's `/usr/bin/test -w` ignores the ACL the action applies to `/run/dbus/system_bus_socket`. Revert to `ubuntu-24.04` until a fixed release is available. See: - openai/codex-action#188 - openai/codex-action#191 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stephan202
pushed a commit
to PicnicSupermarket/error-prone-support
that referenced
this pull request
Nov 11, 2026
On `ubuntu-26.04` the `openai/codex-action` `drop-sudo` step fails, as that image's `/usr/bin/test -w` ignores the ACL the action applies to `/run/dbus/system_bus_socket`. Revert to `ubuntu-24.04` until a fixed release is available. See: - openai/codex-action#188 - openai/codex-action#191
Collaborator
|
Thanks for the PR @zachsplat but we'll likely go with #192 because the Node API semantics are easier for us to consistently assert. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #188.
On Ubuntu 26.04 runners, drop-sudo stops before Codex starts:
For example AgentMeter/agentmeter-action run 40688459476 (image ubuntu-26.04 20261012.163.1, 28 October): https://github.com/AgentMeter/agentmeter-action/actions/runs/40688459476/job/122816823703.
ubuntu-latestmoves to 26.04 by 19 November (actions/runner-images#14748), and the projects linked from #188 have been pinning their jobs toubuntu-24.04to get past it.The ACL is applied; the check is what fails. As the runner-images team found in actions/runner-images#15004,
/usr/bin/teston 26.04 is the uutils one (rust-coreutils 0.10.0), and its-wreads only the mode bits (in my strace it makes a singlestatxcall), so aftersetfacl -m u:runner:---it still says the socket is writable. This change runs the same check as/bin/sh -c 'test -w "$1"' sh /proc/self/fd/3instead. The dash builtin callsfaccessat2(..., W_OK, AT_EACCESS), which applies the ACL. setpriv still sets the same UID and groups,/proc/self/fd/3is still the last argument, and a denied check still exits 1 with empty stderr, so the rest ofisSocketWritableand its unit test intest/dropSudoSocketAcl.test.mjsneed no change./bin/shis what the launcher script already uses.test/dropSudo.test.mjsmade the sametest -wchecks in its setup and its final assertions, so on 26.04 it fails before the action even runs. A smalltestWritable()helper gives those checks the same shell form.dist/main.jsis rebuilt with the build script's esbuild command (esbuild 0.23.0 from the lockfile); rebuilding 13e9c17 that way gives a file identical to the committed one, so the dist diff is only this change and its inline source map.What I ran, all in throwaway containers from the official
ubuntu:24.04andubuntu:26.04images with no network at run time:setfacl -n -m u:runner:---, the socket openedO_PATHon fd 3, then setpriv to the runner UID:/usr/bin/test -w /proc/self/fd/3exits 0 on 26.04 and 1 on 24.04; thesh -cform exits 1 on both; a realconnect()gets EACCES on both. Without the ACL every form exits 0.tsc --noEmit, the esbuild build andnode --test test/*.test.mjsat 13e9c17, as a runner-like user (passwordless sudo, in the docker group, a root-owned/var/run/docker.sock):Could not restrict access to /run/codex-action-...sock, the same error as drop-sudo fails on Ubuntu 26.04 #188. With this whole change that error is gone.I have not run the action itself on a GitHub-hosted runner.
On 26.04, 12 drop-sudo subtests still fail after this change, for a separate reason this PR does not touch:
sudothere is sudo-rs, which ignores-E(sudo: preserving the entire environment is not supported, '-E' is ignored, which also appears in the AgentMeter log above), so the Codex stub never seesCODEX_CAPTURE_PATH. On a runner that means the step's environment, for example a customCODEX_HOME, does not reach Codex; HOME, PATH, NODE_OPTIONS and TMPDIR still arrive because the launcher passes them as arguments.Would you like me to handle the
-Epart in this PR too, or would you rather do that one separately?