Skip to content

Protect privileged setup with a packaged, integrity-bound helper - #33

Merged
Githubguy132010 merged 1 commit into
mainfrom
fix/protected-system-setup
Sep 8, 2026
Merged

Githubguy132010 merged 1 commit into
mainfrom
fix/protected-system-setup

Conversation

@Githubguy132010

Copy link
Copy Markdown
Owner

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.

@kilo-code-bot

kilo-code-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (9 files)
  • README.md
  • bin/marchybar
  • bin/system-action.py
  • packaging/PKGBUILD
  • packaging/install-system.sh
  • packaging/org.marchybar.system.policy
  • packaging/setup-helper
  • tests/broker_test.py
  • tests/system_action_test.py

Reviewed by efficient · Input: 173.7K · Output: 5.6K · Cached: 7.2K

@Githubguy132010
Githubguy132010 merged commit d3de1b3 into main Sep 8, 2026
5 checks passed
@Githubguy132010
Githubguy132010 deleted the fix/protected-system-setup branch September 8, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant