Repository navigation
Conversation
omarchy-migrate ran every pending migration from $OMARCHY_PATH with the caller's sudo credentials a prompt away, and omarchy-install-browser sourced its privileged policy helper and installed the default Firefox policy from the same caller-controlled path. A caller who points OMARCHY_PATH at a tree they can write, then types the sudo password for an update or a browser install, runs their own script as root. Resolve the source tree with the same rule omarchy-plymouth-set and the refresh helpers use: the packaged tree is always trusted, and a linked checkout is trusted only when a root-owned /etc/omarchy.conf names it. The migrate tests authorize their scratch trees through a stand-in conf the same way omarchy-dev-link would.
The locate migration forwarded OMARCHY_UPDATEDB_CONF_PATH into the root shell, so a caller could point the rewrite of locate settings at any existing file. Pin /etc/updatedb.conf. locate.sh keeps its override for tests, and sudo does not pass the caller's value through.
Contributor
Author
|
Closing this one. I went back over it and the change does not cross a privilege boundary.
The description also said the refresh helpers already refuse a user-owned source tree. That was wrong. Only |
This was referenced Sep 1, 2026
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.
omarchy-migrateruns every pending migration from$OMARCHY_PATHwith the caller's sudo credentials a prompt away:omarchy-install-browsersources its policy helper from the same caller-controlled path, and the helper installs the default Firefox policy as root:A caller who points
OMARCHY_PATHat a tree they can write, then types the sudo password for an update or a browser install, runs their own script as root or installs their own mandatory browser policy. The session environment is user-writable by definition, and migration markers live under~/.local/state, so any migration can be made pending again.omarchy-plymouth-setand the refresh helpers already refuse a user-owned source tree unless a root-owned/etc/omarchy.confnames that checkout. The update flow did not.What changed:
omarchy-migratelists and runs migrations from the trusted source root, and passes that root to each migration.omarchy-install-browsersources the browser policy helper from the trusted source root.browser-policy.shinstalls the default policy files from the trusted source root./etc/updatedb.confinstead of forwarding a caller-chosenOMARCHY_UPDATEDB_CONF_PATHinto the root shell.A linked checkout still works when
/etc/omarchy.confis a root-owned regular file whose only line names that checkout, which is whatomarchy-dev-linkwrites. SettingOMARCHY_PATHby hand withoutomarchy dev linkno longer moves the migration queue.Tests: new
test/shell.d/privileged-source-update-test.shpins the trusted-tree behavior and shows a poisonedOMARCHY_PATHis ignored, with sudo stubbed so nothing touches the real system.migrate-scopeandmigrate-wrappernow authorize their scratch trees through a stand-in conf, the wayomarchy-dev-linkwould.locate-testruns the pinned migration against a stand-inupdatedb.conf. All pass, along withmigrate-notifyandbin-style.