mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-27 07:58:01 +01:00
The driver install copied whatever bundle validated: the app's own copy, or, when that was missing, scripts/build-hex-microphone-driver.sh's output in ~/Library/Caches/hex-mic, a user-writable path. Nothing checked the code signature, so an admin-approved install could plant a driver from outside Hex's trust anchor into the HAL folder. A published build (stable or dev channel) now checks the chosen bundle with codesign --verify --deep --strict -R (src/codesign.rs) against app/driver-requirement.txt: anchor apple generic, identifier anomaly.hex.microphone.driver, Developer ID, and Anomaly's team 5NZ4Q7NXJ4. The check runs in the install worker before the admin prompt and reports through DriverActionState::Failed. dev_build::is_local_build is the gate: debug, test, HEX_LOCAL_BUILD, HEX_TEST_BUILD, or an unmarked 0.0.0-dev checkout. It is narrower than is_dev_build, whose dev-channel builds are published and signed with the same Developer ID, so a dev-channel driver is verified too. The candidate selection is a pure function: a bundle copy that is present but broken fails the install instead of falling through to the cache, and only local builds consider ~/Library/Caches/hex-mic at all, so an ad-hoc or other-team signed driver still installs there. The updater is untouched.
1 line
234 B
Text
1 line
234 B
Text
anchor apple generic and identifier "anomaly.hex.microphone.driver" and certificate 1[field.1.2.840.113635.100.6.2.6] exists and certificate leaf[field.1.2.840.113635.100.6.1.13] exists and certificate leaf[subject.OU] = "5NZ4Q7NXJ4"
|