Skip to content

Harden desktop launchers, installers, protocol handlers, and temp files - #19965

Merged
dhh merged 4 commits into
quattrofrom
audit/bin-desktop-security-hardening
Nov 24, 2026
Merged

dhh merged 4 commits into
quattrofrom
audit/bin-desktop-security-hardening

Conversation

@dhh

@dhh dhh commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes injection, path traversal, and temporary-file race vulnerabilities across desktop CLI helpers:

  • Launchers (omarchy-launch-or-focus*, omarchy-launch-tui, omarchy-launch-webapp): Support -- <command> [args...] argv forwarding and direct single-arg launch without eval, preventing shell execution and argument splitting on URLs or arguments containing &, ;, $(), or spaces. Quote $browser_exec, $APP_ID, and basename -- "$1".
  • Desktop entry installers & removers (omarchy-tui-install, omarchy-tui-remove, omarchy-webapp-remove, omarchy-games-retro-install): Reject / and ./.. traversal names, escape Desktop Entry string and Exec= values to block newline key injection and broken quoting, canonicalize RetroArch ROM/core paths, and validate downloaded TUI icons with curl -fsSL and MIME checks.
  • Protocol handlers (omarchy-webapp-handler-zoom, omarchy-webapp-handler-hey): Validate Zoom confno to prevent URL path traversal, strip fragments/control characters, and URI-encode query values while preserving existing percent-escapes.
  • Temp files & quoting (omarchy-debug, omarchy-upload-log, omarchy-menu-select, omarchy-menu-input, omarchy-menu-images, omarchy-agent-look-plugin, omarchy-theme-set-herdr-machines): Replace fixed /tmp paths and mktemp+rm TOCTOU races with private mktemp/mktemp -d directories cleaned up on EXIT, JSON-encode paths interpolated into generated QML, and pass -- before the SSH host in herdr theme sync.

Verified by Codex and Claude

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with a non-blocking focus regression for quoted TUI command strings.

Findings

  1. P2 Quoted commands stop focusing ▶

Summary

Hardens desktop launchers, app installers, protocol links, and temporary files.

  • Launchers pass commands and their arguments without splitting them.
  • TUI and web-app launchers keep names and entries within safe paths.
  • RetroArch launchers keep game paths and special characters intact.
  • Zoom and HEY links use checked, encoded values in their web-app URLs.
  • Helper scripts keep temporary files private and path values intact.

All five supplied previous threads are addressed in the current code. They were unnumbered, so they have no entries in previousFindings.

Reviews (4) · Last reviewed commit: "Simplify launch-or-focus-tui, debug publ..." · Reviewed by Greptile

Comment thread bin/omarchy-launch-or-focus-tui Resolved
Comment thread bin/omarchy-tui-install Resolved
Comment thread bin/omarchy-tui-install Resolved
Comment thread bin/omarchy-debug Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

Classification is unsettled at 8e4edabe8e322e31fda812929552789f949a1af4: Codex (GPT-6, High) classified the injection and path-traversal fixes as bug; DeepSeek V4.1 Flash (classification effort not reported) returned enhancement. The diff also introduces an argv launch interface, so the classification affects whether this runs automatically as a fix or waits for assignment as a feature.

I read the 20-file diff, surrounding launcher callers, existing review comments and base-branch house rules. The queue procedure stops on classification disagreement, so no worker tests or full correctness second opinion ran, and no branch changes or labels were applied. This is waiting for the maintainer to resolve the classification.

Comment thread bin/omarchy-debug Resolved
@omarchybot omarchybot added the enhancement New feature or request label Nov 23, 2026
Comment thread bin/omarchy-launch-or-focus-tui Resolved
@dhh
dhh merged commit ec17b20 into quattro Nov 24, 2026
3 checks passed
@dhh
dhh deleted the audit/bin-desktop-security-hardening branch November 24, 2026 08:43
cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 24, 2026
…es (omacom#19965)

* Harden desktop launchers, installers, protocol handlers, and temp files

* Address Greptile review on TUI launcher, icons, and debug log

* Keep omarchy-debug reading its own private temp file

* Simplify launch-or-focus-tui, debug publish, and herdr control dir
omarchybot added a commit to rihadroshan/omarchy that referenced this pull request Nov 26, 2026
Keep the current installer guards and locale test fixes from quattro while preserving top-level TUI launcher precedence. The hardening and nested lookup now ship through omacom#19965; consolidate the remaining regression coverage into the existing webapp-name tests and force both find traversal orders.

Co-Authored-By: Codex High <noreply@openai.com>
@emirb emirb added this to the 4.6.0 milestone Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants