Repository navigation
[codex] OM-SEC-21: Authenticate only after package picker code exits - #9475
Open
AFOliveira wants to merge 7 commits into
Open
AFOliveira wants to merge 7 commits into
AFOliveira wants to merge 7 commits into
Conversation
AFOliveira
marked this pull request as draft
September 1, 2026 09:50
Member
Author
|
Reworked in f1282ad after comparing the finding with current |
AFOliveira
marked this pull request as ready for review
September 21, 2026 09:10
Preserve the existing omacom#9457 foundation history and integrate quattro before applying the package-picker change.
Protect Bash startup and sanitize inherited shell state before discovery. Revoke cached authorization before the configurable picker runs, validate selections, and authorize only the fixed Pacman transaction with sudo -N. Preserve cancellation and failure statuses, display the transaction result, and invalidate authorization on exit and handled signals. Include regression coverage for startup isolation, argument validation, status handling, and cleanup.
AFOliveira
force-pushed
the
codex/om-sec-21-cold-package-picker
branch
from
September 21, 2026 12:43
41e6882 to
a2dbf11
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.
Package selection runs with cold sudo authorization. After discovery and the configurable picker finish, only a validated selection reaches one fixed command-scoped Pacman transaction. Finding: OM-SEC-21.
Both install/remove entrypoints resolve their canonical shared library, validate privileged Bash startup, sanitize inherited Bash state and bind the source root before invoking configurable picker behavior. The shared library remains byte-identical to #9457's approved
ea617b91version. Authorization is revoked on completion, cancellation and failure.Query failures are checked before starting fzf. Empty selection, no match and picker cancellation are clean no-ops; partial output from a failed/cancelled picker is discarded. Only status 0 plus validated package names reaches the fixed Pacman argument array. #9795/#9227's AUR review/confirmation changes are separate scope; this picker uses repository packages.
Integrated current
quattro(8f324c90) through an ordinary merge at41e6882a. The two conflicts preserve upstream's success/failure presentation: capture the command-scoped transaction result, pass it toomarchy-show-done, and return that result. No keepalive or xargs dispatch is restored. This reconciliation adds four net production lines and five net fixture lines; other changes in the merge come directly from upstream.Validation at
41e6882a: all four focused regression groups and 112 CLI checks pass, along with Bash syntax and whitespace checks. The regressions assert exact transaction arguments, success/failure display status, cleanup, cancellation, query/picker failures, initial/final revocation failures, source-root mismatch and inherited startup state. Fresh independent Daybreak review of the reconciliation returned PASS with no findings; its targeted status, cancellation and cleanup mutants were killed.Native verification on 21 September used exact installed candidate commands in a disposable Omarchy VM with real sudo, fzf, Pacman and yay. Installing/removing
slthrough the CLI router uses one password prompt and shows Done. A controlled Pacman-lock failure in each command shows Failed with exit 1 and preserves failure. Cancelling authentication, Esc, Ctrl-C in the picker, and empty selections preserve cleanup. The background authorization-reuse witness never obtained root on the candidate. Earlier same-day native controls reproduced reuse when only-Nwas removed. The guest was cleaned up and shut down.Depends on #9457 and its coordinated shared-helper release with omarchy-pkgs#257. These are installed-command tests on the disposable VM, not a build or certification of the final coordinated package pair. The broader shell run was not fully green: five cross-repository suites lacked their external omarchy-pkgs checkout, and 16 environment-dependent suites skipped. The scoped package-picker suite passed. AUR execution and alternative sudo policies remain outside this PR's scope.
History consolidated at
a2dbf117: one complete package-picker fix with its regression tests, following the upstream integration mergeb2341a06. The five inherited #9457 foundation commits are unchanged. The complete repository tree is byte-identical to the previously reviewed and VM-tested41e6882a; this is a history-only rewrite. The four focused regression groups and all 112 CLI checks were rerun successfully on the consolidated head.