Protect privileged setup with a packaged, integrity-bound helper - #33
Merged
Merged
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (9 files)
Reviewed by efficient · Input: 173.7K · Output: 5.6K · Cached: 7.2K |
5 tasks
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.
Addresses HANCORE-linux's security finding in omacom/omarchy-plugin-marketplace#5059 (comment).
Setup previously passed a user-writable checkout installer to pkexec /bin/bash. A replaced installer would therefore run as root after authentication.
This change routes setup/removal through a fixed root-owned helper supplied by a separately reviewed administrator-installed Arch package. The launcher verifies the helper's path, ancestors, ownership, modes, and SHA-256 before invoking its dedicated Polkit action. The helper accepts only setup/remove, verifies fixed payload hashes and destination trust, and executes with an isolated Python interpreter and a clean shell environment. No privileged code is loaded from the plugin checkout.
The package has pinned input checksums and no install hook. README documents the separate trust/bootstrap step, upgrades, and removal. No signed binary package is published yet; local checksums do not authenticate an untrusted source or compromised build environment.
Validation: all 39 Python broker/setup/security tests pass; shell syntax and git diff checks pass. Regression coverage replaces the checkout installer and checks that setup/removal refuse a missing protected helper without executing the replacement; also covers writable paths, ownership, symlinks, digest mismatch, and invalid arguments. These tests are included in the existing CI entry point.
Not verified here: makepkg/package installation, live Polkit authentication, Omarchy validation, and physical Touch Bar behavior. After merge, marketplace validation and the security baseline must be rerun against the resulting main SHA. The remaining native/device/backend security review is still outstanding.