Summary
openai/codex-action@v1 fails on our self-hosted Linux runner with the default safety-strategy: drop-sudo.
In this environment, there is no runner OS user/sudo setup, and the action crashes during the drop-sudo phase.
What we observed in logs
The action runs with:
safety-strategy: drop-sudo
Then fails in the drop-sudo step with:
runner is not a member of the sudo group.
No runner entries found in /etc/sudoers.d requiring changes.
No runner entries found in /etc/sudoers requiring changes.
runner already lacks sudo privileges.
Error: Command failed: id -Gn runner (exit code 1)
stderr: 'id: ‘runner’: no such user\n'
Error: Command failed: sudo -n node ... drop-sudo --root-phase --user runner --group sudo (exit code 1)
Expected behavior
If drop-sudo is the default strategy, the action should handle self-hosted environments where:
- the OS user is not named
runner, and/or
- sudoers entries do not exist.
At minimum, it should fail early with a clear actionable message. Ideally, it should gracefully no-op/fallback when no privileged drop is needed.
Why this matters
Self-hosted runners often have custom hardening and account names. Assuming a fixed runner user/sudo layout makes the default strategy brittle for valid self-hosted setups.
Suggested fixes
- Detect the actual current user instead of assuming
runner.
- Treat missing
runner user/sudoers entries as a non-fatal no-op when privileges are already
constrained.
- Improve error messaging to explain self-hosted requirements and supported layouts.
Summary
openai/codex-action@v1fails on our self-hosted Linux runner with the defaultsafety-strategy: drop-sudo.In this environment, there is no
runnerOS user/sudo setup, and the action crashes during the drop-sudo phase.What we observed in logs
The action runs with:
safety-strategy: drop-sudoThen fails in the
drop-sudostep with:runner is not a member of the sudo group.No runner entries found in /etc/sudoers.d requiring changes.No runner entries found in /etc/sudoers requiring changes.runner already lacks sudo privileges.Error: Command failed: id -Gn runner (exit code 1)stderr: 'id: ‘runner’: no such user\n'Error: Command failed: sudo -n node ... drop-sudo --root-phase --user runner --group sudo (exit code 1)Expected behavior
If
drop-sudois the default strategy, the action should handle self-hosted environments where:runner, and/orAt minimum, it should fail early with a clear actionable message. Ideally, it should gracefully no-op/fallback when no privileged drop is needed.
Why this matters
Self-hosted runners often have custom hardening and account names. Assuming a fixed
runneruser/sudo layout makes the default strategy brittle for valid self-hosted setups.Suggested fixes
runner.runneruser/sudoers entries as a non-fatal no-op when privileges are alreadyconstrained.