d593847728538a3fb3a5c69f5f43f0f85d85ec1d
An installer that writes a root-owned file through a heredoc with an unquoted delimiter (<<EOF rather than <<'EOF') has the installing user's shell expand the body first, so a user-controlled value is baked in as a literal. Send that into /etc and root later reads or executes a path the unprivileged user picked: a udev rule carrying $HOME/.local/share/omarchy/bin/... resolves through a symlink that user owns, so replacing the symlink gets their code run as root. Add the static check. A heredoc is flagged when its delimiter is unquoted, its body contains an install-time expansion (escaped \$VAR does not count, since that is left for a root daemon to expand at runtime), and its output reaches /etc, /usr, /opt, /srv, /boot or /var/lib via sudo tee, sudo dd, a redirect, or an install/cp/mv of the generated scratch file. Destinations written as variables are resolved from the file's own assignments. Sites that genuinely need install-time expansion declare it inline: # omarchy:heredoc-expands paths=none -- $servers is a validated IP list paths= is machine-checked against the expansions the scanner finds to be path-shaped, so this cannot become a rubber stamp: adding a $HOME/... to an already-annotated heredoc makes the declaration false and trips the check again. Path expansions anchored under a root-owned prefix, as in "/etc/systemd/system/$unit", are correctly not path-shaped. Annotate the sites the scan reports, each of which expands a scalar: DNS addresses in omarchy-dns, a literal PAM line in omarchy-setup-security-fingerprint, kernel cmdline parameters and usernames in omarchy-upgrade-to-quattro. omarchy-provision-owner expanded a unit name that was already a constant, so its delimiter is now quoted and the name hardcoded; the generated unit file is byte-identical. omarchy-windows-vm declares paths=storage,shared, the only site that interpolates a user-chosen path. Fixtures prove non-vacuity in both directions: the write routes other than a pipe into sudo tee, the shapes that must stay quiet, udev rules and a shutdown unit taken verbatim from this repository's history, and the rubber-stamp case where a paths=none annotation on a baked $HOME path still fails.
Omarchy
Omarchy is a beautiful, modern & opinionated Linux distribution by DHH.
Read more at omarchy.org.
The Omarchy Manual
The manual lives in manual/, which is its authoritative source. It's
mirrored to learn.omacom.io, where
its screenshots are also hosted.
The Basics
- Getting Started
- Coming From Mac or Windows
- Navigation
- The top bar
- Themes
- Hotkeys
- Unified Clipboard & History
- Reminders
- Notices
- Text Extraction & Dictation
- Screenshots & Recording
- Toggles, idle & screensaver
- Omarchy CLI
The Applications
- Terminal
- Neovim
- AI
- Development Tools
- Shell Tools
- Shell Functions
- TUIs
- GUIs
- Browsers
- Commercial apps/services
- Web Apps
- Gaming
- Filling out PDFs
- Windows VM
- Other Packages
Configuration
- Updates
- Dotfiles
- Shell plugins
- Monitors
- Keyboard, Mouse, Trackpad
- Networking
- System sleep
- Hardware authentication
- Fonts
- Backgrounds
- Prompt
- Branding
- Common tweaks
- Making your own theme
The Rest
- Mac support
- Troubleshooting
- FAQ
- System snapshots
- Security
- Omarchy on...
- Dual Boot Install
- Unattended Installs
License
Omarchy is released under the MIT License.
Languages
Shell
58.8%
QML
29.8%
JavaScript
4%
Python
3.1%
Go Template
2.3%
Other
2%