Repository navigation
Conversation
Automated AI review
Verified: the new migration restores Real
Log lines on stdout can defeat the
|
Automated AI review
Outcome: One minor new issue: the acceptance security check still rejects the Earlier findings at Acceptance security check rejects the restored group
Suggested change: also accept Reproducer (fails at 1c88d05)Self-contained script, run from an Omarchy checkout ( #!/bin/bash
set -euo pipefail
root=${1:?omarchy checkout}
test_dir=$(mktemp -d)
trap 'rm -rf "$test_dir"' EXIT
stub_bin="$test_dir/bin"
mkdir -p "$stub_bin"
printf 'wheel\n' >"$test_dir/groups"
cat >"$stub_bin/id" <<'STUB'
#!/bin/bash
[[ ${1:-} == "-nG" ]] || exit 2
cat "$STUB_GROUPS_FILE"
STUB
cat >"$stub_bin/gpasswd" <<'STUB'
#!/bin/bash
[[ $1 == "-a" ]] || exit 2
printf '%s %s\n' "$(cat "$STUB_GROUPS_FILE")" "$3" >"$STUB_GROUPS_FILE"
STUB
cat >"$stub_bin/sudo" <<'STUB'
#!/bin/bash
[[ ${1:-} == "-n" ]] && exit 1
exec "$@"
STUB
cat >"$stub_bin/pacman" <<'STUB'
#!/bin/bash
exit 1
STUB
cat >"$stub_bin/omarchy-cmd-present" <<'STUB'
#!/bin/bash
exit 0
STUB
cat >"$stub_bin/voxtype" <<'STUB'
#!/bin/bash
[[ $1 == "config" && $2 == "get" && $3 == "hotkey.enabled" ]] || exit 2
printf 'true\n'
STUB
cat >"$stub_bin/omarchy-state" <<'STUB'
#!/bin/bash
exit 0
STUB
cat >"$stub_bin/grim" <<'STUB'
#!/bin/bash
exit 0
STUB
chmod +x "$stub_bin"/*
export STUB_GROUPS_FILE="$test_dir/groups"
echo "== migrations/1789490499.sh (hotkey enabled, no xpadneo-dkms, no ydotool)"
USER=tester PATH="$stub_bin:$PATH" bash -euo pipefail "$root/migrations/1789490499.sh"
echo "groups now: $(cat "$STUB_GROUPS_FILE")"
echo "== test/acceptance.d/security-test.sh"
set +e
OMARCHY_ACCEPTANCE_DIR="$test_dir/artifacts" PATH="$stub_bin:$PATH" \
bash "$root/test/acceptance.d/security-test.sh"
status=$?
set -e
echo "acceptance security-test exit status: $status"Actual output at 1c88d05 (stdout, then stderr): The same output was produced with the PR's two files applied on top of current With the suggested change to Suggested change used for that run: --- a/test/acceptance.d/security-test.sh
+++ b/test/acceptance.d/security-test.sh
@@ -15,11 +15,12 @@
source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh"
# Membership of `input` gives raw access to /dev/input/event*: any process
-# running as the user could log keystrokes. Only the opt-in controller and
-# ydotool features may grant it.
+# running as the user could log keystrokes. Only the opt-in controller, ydotool
+# and Voxtype evdev hotkey features may grant it.
verify_input_group() {
if id -nG | grep -qw input; then
- if pacman -Q xpadneo-dkms &>/dev/null || pacman -Q ydotool &>/dev/null; then
+ if pacman -Q xpadneo-dkms &>/dev/null || pacman -Q ydotool &>/dev/null ||
+ [[ $(RUST_LOG=off voxtype config get hotkey.enabled 2>/dev/null) == "true" ]]; then
pass "input group membership is backed by an opt-in feature"
else
fail "user is not in the input group" "no controller or ydotool support installed to justify it"DetailsVerified at 1c88d05:
Design point, new detail: on Voxtype 1.1.0 and 1.1.1-rc4, a wrongly typed value in Unchanged: the Optional notesOptional test improvement: the PR test passes even with --- a/test/shell.d/voxtype-input-group-migration-test.sh
+++ b/test/shell.d/voxtype-input-group-migration-test.sh
@@ -23,6 +23,8 @@
#!/bin/bash
[[ $1 == "config" && $2 == "get" && $3 == "hotkey.enabled" ]] || exit 2
[[ ${STUB_VOXTYPE_FAILS:-0} == "0" ]] || exit 1
+# Voxtype writes its tracing output to stdout, and RUST_LOG overrides its level.
+[[ ${RUST_LOG:-off} == "off" ]] || printf '%s\n' ' DEBUG Loading config from "/home/tester/.config/voxtype/config.toml"'
printf '%s\n' "${STUB_HOTKEY_ENABLED:-false}"
STUB
cat >"$stub_bin/sudo" <<'STUB'
@@ -73,3 +75,7 @@
[[ ! -e $gpasswd_calls ]] || fail "migration does not grant input when voxtype config get fails"
[[ ! -e $state_calls ]] || fail "a failed voxtype query does not flag a reboot"
pass "migration fails closed when the Voxtype config query fails"
+
+RUST_LOG=debug run_migration "wheel" true >/dev/null
+grep -qsxF -- "-a tester input" "$gpasswd_calls" || fail "migration restores input when RUST_LOG is set in the update environment"
+pass "migration ignores Voxtype log output when reading hotkey.enabled"With the migration from d194305, the new case prints Review informationTest scope: Source and sandbox tests at AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
[Low impact] The PR appears safe to merge; no new actionable issues remain. SummaryAdds a one-time notice for Voxtype users whose own hotkey depended on membership in
Reviews (3) · Last reviewed commit: "Check the group database and name quattr..." · Reviewed by Greptile |
|
Reviewed at b126695 and verified on a disposable Omarchy VM with
I pushed b126695, which changes Codex at medium effort reviewed the change including that commit and found no defect. It agreed that a new migration is the proportionate fix, since 1787865477's marker already exists on the machines that were hit. That agreement is not guaranteed to be independent of this review. It also pointed out that the gate is Voxtype's effective setting rather than an explicit line in the file: a missing One question is left for the maintainer, and it is not a defect: whether a sudo-backed |
|
Looks right to me: restore |
b126695 to
efbc7bc
Compare
|
Changed the approach at efbc7bc (rebased onto Since this PR was opened, #14552 added Hyprland push-to-talk on a bare modifier ( What this means for the earlier review points:
The PR diff is now just |
|
Re-reviewed at efbc7bc, the notice-only version. I read it against current 1. The notice is skipped for the users it is meant for ( ! id -nG "$USER" | grep -qw input &&This is the same point Greptile raised on line 15. 2. The keys it names are not Checked and found fine:
Classification is unsettled. I classify this as a bug fix, because it repairs the silent loss of the hotkey that 1787865477 caused. The classifier's separate pass, Codex at medium effort, called it an enhancement: it now adds a notice instead of restoring the old behaviour. With no agreement, I've taken the |
Voxtype writes tracing output to stdout, so RUST_LOG=debug (or a skipped config section on 1.1.0) puts log lines in front of "true" and the migration marks itself done without restoring the group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…closed Press binds on a bare modifier do fire; only the release never does, so push-to-talk is what Hyprland can't do. The new test case makes sure a failing voxtype config query never grants input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eptance check verify_input_group still allowed input only for xpadneo-dkms or ydotool, so on a machine where the new migration restored the group for an opted-in Voxtype hotkey, the security acceptance test reported it as a leftover grant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nting input Hyprland now binds hold Right Alt and F9 for push-to-talk, so the evdev hotkey no longer needs a sudo-backed input grant gated on user config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…type notice Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
efbc7bc to
0c14335
Compare
|
Both points are fixed in 0c14335, rebased onto
The PR diff is still just |
Fixes #12013.
migrations/1787865477.sh(from #9200) drops the blanketinputgroup grant, which is the right call: membership gives raw read/write access to/dev/input/event*, so any process running as the user can capture keystrokes. Users who set Voxtype's[hotkey] enabled = truerelied on that grant. Their daemon keeps running and logsListening for hotkey, then a singleERROR Hotkey listener error: No keyboard device found in /dev/input/line, and the hotkey silently stops working.Approach
Notify instead of regranting. This PR first restored
inputfor opted-in users, but since thenquattrobinds push-to-talk on a bare modifier in Hyprland (default/hypr/bindings/dictation.lua: hold Right Alt or F9, toggle with Super + Ctrl + X, from #14552). That path needs no group membership, so a sudo-backedinputgrant gated on user-writable config is no longer justified.The migration finds users with Voxtype installed,
hotkey.enabledresolving totrue(read withRUST_LOG=offso tracing output on stdout can't break the comparison), and noinputmembership. It prints the fix in the update terminal and sends a critical notification so it outlives the scrollback. It changes no groups and edits no config.This also addresses the earlier review points: there is no grant, so the
$USERtarget, the user-writable gate, and "input outlives Voxtype" no longer apply. The acceptance security check and the stubbed migration test are dropped; peragents/skills/migrations.md, migrations don't get tests undertest/.A failed
voxtype config getstill fails closed and marks the migration done. That's fine for a notice: the worst case is a missed message, not a missed grant.Testing
id,voxtypeandomarchy-notification-send: it notifies whenhotkey.enabledistrueand is silent whenfalse.voxtype1.1.0:RUST_LOG=off voxtype config get hotkey.enabledprints exactlytruefor a config withenabled = true../test/cli,config-test.sh,migrate-scope-test.shandmigrate-wrapper-test.shpass.🤖 Generated with Claude Code