Skip to content

Require a per-session token before honoring notification click-exec - #12713

Closed
chessing234 wants to merge 1 commit into
omacom:quattrofrom
chessing234:fix/8433-exec-token-gate
Closed

chessing234 wants to merge 1 commit into
omacom:quattrofrom
chessing234:fix/8433-exec-token-gate

Conversation

@chessing234

@chessing234 chessing234 commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Mint a random token under $XDG_RUNTIME_DIR/omarchy/notification-exec-token (0600) when the notifications service starts.
  • omarchy-notification-send --exec attaches that value as omarchy-exec-token; the shell only keeps omarchy-exec-argv when the tokens match.
  • Sandboxed same-uid bus clients can still forge the argv hint, but cannot read the host runtime dir, so click-to-exec fails closed.

Closes #8433.

Test plan

  • bash test/shell.d/notifications-test.sh
  • bash test/shell.d/notification-send-test.sh
  • With the shell running, omarchy-notification-send "t" --exec true still produces a clickable toast
  • A Notify call that sets only omarchy-exec-argv (no token) does not run a command on click

Sandboxed same-uid bus clients can forge omarchy-exec-argv; mint a token
under XDG_RUNTIME_DIR that only host helpers can read, and ignore click
commands whose omarchy-exec-token does not match.

Closes omacom#8433.
@chessing234

Copy link
Copy Markdown
Contributor Author

closing — already covered in #12111.

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.

Hardening: honor omarchy-exec-argv only from senders holding a per-session token (sandboxed bus clients can currently get click-to-exec)

1 participant