Repository navigation
fix: use installed sudo without cached authentication - #43
Merged
Merged
Conversation
MrPointer
force-pushed
the
fix/installer-sudo-permissions
branch
from
November 14, 2026 18:45
a19c119 to
4d7afb6
Compare
Select installed sudo or doas without probing cached authentication. Fail closed when neither tool is installed rather than running privileged operations as an unprivileged user. Add Go regressions for tool selection and error propagation without unprivileged retries in package installation and shell changes.
Set explicit model variants for each worker tier and align the cheapest worker instructions with its configured reasoning effort.
Verify real password authentication and protected effects through the installer's package and shell setup paths, including rejected passwords without unprivileged retries. Run shared checks directly on disposable Ubuntu CI runners. Keep an optional dependency-only image for local testing and document the privilege behavior, test entry points, and safety requirements.
Use the default authentication timestamp scope and set the test prompt through SUDO_PROMPT instead of unsupported sudoers settings. Keep the same authentication and protected-effect assertions for both traditional sudo and sudo-rs.
Treat rejected authentication as a passing error assertion in Go rather than an expected test-process failure. Require successful Go test exits for every scenario so unexpected assertion failures fail the CI job.
MrPointer
force-pushed
the
fix/installer-sudo-permissions
branch
from
November 14, 2026 18:58
4d7afb6 to
d332b94
Compare
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
The installer now selects installed
sudobeforedoaswithout probing cached authentication, so password-requiredsudocan authenticate when the privileged command runs.Non-root users without either tool receive an actionable error instead of an unprivileged fallback; direct execution as root is unchanged.
New real-authentication checks cover APT and shell setup, with matching unit coverage for APT, DNF, and shell error propagation.
The change also updates installer documentation and explicitly configures the three Go worker model variants.
Key Decisions
🔐 Select Privilege Tools Without Authenticating
Tool selection now checks whether
sudoordoasis installed, not whether it can run without a password. The selected command authenticates through the controlling terminal when it executes; the installer does not collect or store passwords. If neither tool is installed for a non-root user, the operation fails with guidance rather than retrying unprivileged.🧪 Test Real Password Authentication
Disposable Ubuntu and Debian checks run the real APT and shell-setup paths with a cold sudo cache. They verify both accepted and rejected passwords, require root-owned effects only after authentication, and reject any unprivileged retry. The shared runner requires explicit disposable-machine opt-in, resets state between cases, cleans up test state, and uses a local package fixture without downloading packages.
Native Ubuntu CI runs
task test:privilege; an optional offline Docker runner supports local macOS testing. The privilege job participates in the aggregate CI gate, including cancellation failure. Unit tests cover propagation of privilege failures for APT, DNF, and shell operations.The worker configurations now use
openai/gpt-6-luna#high,openai/gpt-6.1-terra#medium, andopenai/gpt-6.1-sol#medium.🔄 Before & After
sudo, thendoas; reports a missing-tool error otherwise