What changed, and why it matters
This commit turns off a feature called BitBoxSync by default. Unless a developer explicitly enables it during build, any request to use BitBoxSync will now receive a standard 'disabled' error. The change is framed as temporary while API changes are pending. It is a defensive gating change, not a fix for a known active attack.
Treat this as a routine defensive change. If BitBoxSync is intended to ship, ensure the API is reviewed and the feature flag is removed or enabled only after security review. No immediate user action is required.
Security signals we found
Feature-gates an API that was previously reachable by default
Returns Error::Disabled for requests to the gated API
Commit message describes the change as temporary pending API changes
Evidence from the diff
The commit adds a Cargo feature flag named bitboxsync (default-disabled) to the bitbox02-rust crate. The bitboxsync module is now conditionally compiled only when the feature is enabled, and the Request::BitboxSync arm in process_api returns Error::Disabled when the feature is absent. This gates the BitBoxSync API surface from being reachable in normal builds.
Changed components
src/rust/bitbox02-rust/Cargo.tomlsrc/rust/bitbox02-rust/src/hww/api.rsBitBoxSync APIInspect captured patch +7 / −0
diff --git a/src/rust/bitbox02-rust/Cargo.toml b/src/rust/bitbox02-rust/Cargo.toml
index f0b919e..77de86d 100644
--- a/src/rust/bitbox02-rust/Cargo.toml
+++ b/src/rust/bitbox02-rust/Cargo.toml
@@ -96,6 +96,9 @@ app-cardano = [
"dep:crc"
]
+# Temporarily disabled pending API changes.
+bitboxsync = []
+
testing = [
"dep:bitbox-platform-host",
"bitbox-platform-host?/testing",
diff --git a/src/rust/bitbox02-rust/src/hww/api.rs b/src/rust/bitbox02-rust/src/hww/api.rs
index 8af9114..88edde4 100644
--- a/src/rust/bitbox02-rust/src/hww/api.rs
+++ b/src/rust/bitbox02-rust/src/hww/api.rs
@@ -17,6 +17,7 @@ mod cardano;
mod backup;
mod bip85;
+#[cfg(feature = "bitboxsync")]
mod bitboxsync;
mod bluetooth;
mod change_password;
@@ -201,7 +202,10 @@ async fn process_api(hal: &mut impl crate::hal::Hal, request: &Request) -> Resul
#[cfg(not(feature = "app-cardano"))]
Request::Cardano(_) => Err(Error::Disabled),
Request::Bip85(request) => bip85::process(hal, request).await,
+ #[cfg(feature = "bitboxsync")]
Request::BitboxSync(request) => bitboxsync::process(hal, request).await,
+ #[cfg(not(feature = "bitboxsync"))]
+ Request::BitboxSync(_) => Err(Error::Disabled),
Request::Bluetooth(pb::BluetoothRequest {
request: Some(request),
}) => bluetooth::process_api(hal, request)
Why this scored 30/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.