Skip to content

feat(contrib): narrow the bolt receiver rule to the hid++ interface (#197) - #205

Merged
q-horde merged 2 commits into
epic/180-betafrom
feature/197-bolt-rule-hidpp-interface
Oct 30, 2026
Merged

q-horde merged 2 commits into
epic/180-betafrom
feature/197-bolt-rule-hidpp-interface

Conversation

@q-horde

@q-horde q-horde commented Oct 30, 2026

Copy link
Copy Markdown

Summary

Follow-up slice of the beta epic #180, from the security re-review of #196. The 046d:c548 line of contrib/udev/70-keyvo.rules tagged every hidraw node of the Bolt receiver, one per USB interface. The owner's measurement in #187 (docs/hardware-notes.md, record D8) shows that the kernel runs the receiver without per-device nodes, so the paired devices share those interfaces: 00 carries what is typed on the MX Mechanical, 01 the MX Master 4's and the undiverted Dialpad's mouse reports, 02 HID++ only, 03 a digitizer. The rule now matches interface 02 as well, so only the HID++ node the Dialpad driver opens gets the ACL.

Closes #197

Changes

  • contrib/udev/70-keyvo.rules: the c548 line gains ATTRS{bInterfaceNumber}=="02", the only ATTRS key on the line (udev matches all ATTRS keys of a rule on one parent device); the IMPORT{parent}="HID_ID" match on the immediate HID parent stays. The comment says what the HID++ node carries according to D8 (HID++ 10/11 only: nothing while undiverted, the Dialpad's 0x1B04 and 0x4610 reports while keyvo diverts them, no keyboard or mouse input), what the closed nodes carry, and that the HID++ node reaches every paired device. The old "to be measured" wording and the claim about hid-logitech-dj child nodes, which D8 contradicts on the owner's host, are gone.
  • crates/keyvo-core/tests/contrib.rs: the udev rule test pins the narrowed line exactly and still rejects any other line, MODE, GROUP and 0666. It failed on the old rule before the change.
  • Docs:
    • SECURITY.md, the device access paragraph: which node stays open, what it carries and what the other three carry, from D8. One addition beyond the issue text: a process of the seat user can send any HID++ request to the keyboard and the mouse over that node (settings, diverts of their divertable controls), as Solaar does.
    • docs/spec.md: §3 "As built (beta, chore(contrib,cli): systemd user unit, udev rule and keyvo doctor #184)" says the same, and there is a changelog entry.
    • docs/hardware-notes.md: D8 "Settles" names the rule.
    • README.md: the install bullet says "the Bolt receiver's HID++ node".
    • docs/beta-test.md: section 5 has the block for this PR.

Automated checks

  • just fmt-check exit 0
  • just lint (clippy, -D warnings) is clean
  • just test passes (756 passed, 1 skipped)
  • just deny passes (advisories, bans, licenses, sources ok)
  • Coverage is not lowered (no code change; the rule is a contrib file, pinned by contrib.rs)
  • Documentation updated in this PR (SECURITY, spec, hardware notes, README, beta test guide)

User test

These are the owner's items, on the host with the rule of this branch installed (docs/beta-test.md, section 5, block for this PR).

  • After installing the rule: run getfacl on each 046d:c548 hidraw node. Only the HID++ node (bInterfaceNumber 02, reports 10 11) lists the user.
  • bin/keyvo dial runs as the user and prints events.

Notes for reviewer

Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@q-horde
q-horde marked this pull request as ready for review October 30, 2026 14:35
@q-horde
q-horde requested a review from q-soriarty as a code owner October 30, 2026 14:35
@q-horde
q-horde merged commit 9c848b0 into epic/180-beta Oct 30, 2026
6 checks passed
@q-horde
q-horde deleted the feature/197-bolt-rule-hidpp-interface branch October 30, 2026 14:44
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.

1 participant