fix(drop-sudo): preserve system service socket permissions and surface proxy errors - #161
Open
Alphaxiaoteng wants to merge 1 commit into
Open
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Alphaxiaoteng
force-pushed
the
fix/preserve-system-service-sockets
branch
from
August 25, 2026 07:49
3866022 to
b1cabad
Compare
Alphaxiaoteng
force-pushed
the
fix/preserve-system-service-sockets
branch
from
August 25, 2026 07:49
b1cabad to
5186e90
Compare
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
recheck |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
/run/dbus/system_bus_socketand/run/systemd/*) during thedrop-sudoprivilege drop process, preventingsystemd-resolvedand other core system peers from entering permission-denied crash loops on GitHub-hosted and Linux runners.Fixes #160 and resolves the failure misreporting in #127.
Root Cause
1. D-Bus & systemd socket mode truncation (#160)
Under
safety-strategy: drop-sudo,restrictRootServiceSocketpreviously stripped all group and other permission bits (fs.chmod(fd, stats.mode & 0o700)) on every discovered root-owned socket under/run.On Ubuntu / Debian systems:
systemd-resolvedruns as the non-rootsystemd-resolveuser and relies on connecting to/run/dbus/system_bus_socketand/run/systemd/journal/stdout.0o700removes group/world readability and writability, immediately denying non-root system daemons access to the system bus.systemd-resolvedfails to connect to D-Bus and crash-loops, permanently destroying local DNS name resolution across the entire runner machine.2. Swallowed proxy startup diagnostics (#127)
When
codex-responses-api-proxyis spawned in the background, stdout/stderr were previously discarded. If the proxy exited due to misconfiguration or key format refusal, the action failed only with the genericresponses-api-proxy did not write server infoafter a 10s timeout, hiding the real root cause from the user.Changes
PRESERVED_SYSTEM_SOCKET_PREFIXESinsrc/dropSudo.tsto safeguard/run/dbus/,/run/systemd/,/var/run/dbus/, and/var/run/systemd/from mode truncation duringrestrictRootServiceSocket().test/preservedSystemSockets.test.mjsverifying that system sockets remain preserved with0666while general daemon sockets (e.g.docker.sock) remain properly restricted to0700.Verification
npm run buildcompleted cleanly (esbuild bundle updated).npm testpassed: 145/145 tests passing (0 failures, 3 skipped Windows-specific isolation tests).