fix(core/xtask): add `"ui_debug_overlay"` feature on debug builds
What changed, and why it matters
This commit fixes a build configuration issue so that debug builds of Trezor firmware, bootloader, and production-test firmware automatically enable a visual 'ui_debug_overlay' feature. That feature displays a small red square marker in the top-right corner of the screen, making it obvious when a debug/non-production build is running. It is a UI/UX and build-system change, not a fix for an exploitable security vulnerability.
No security action required. Treat as a normal build-system/UI fix. If reviewing, verify that the 'ui_debug_overlay' feature is only cosmetic and cannot leak secrets or alter behavior in release (pyopt=true) builds.
Security signals we found
No security-relevant code changed
Change is purely a debug UI indicator
No changelog entry requested by vendor
No incident or vulnerability disclosure referenced
Evidence from the diff
In core/embed/xtask/src/feature_resolver.rs, the feature resolver now pushes the ‘ui_debug_overlay’ Cargo feature whenever pyopt is false (i.e., debug builds). The existing code already pushed ‘ui_performance_overlay’ under the same condition and added ‘debuglink’/’ui_debug’ based on debug_link settings. The new feature gates a red-square visual indicator. There is no change to cryptographic code, memory safety, authentication, or secrets handling.
Changed components
core/embed/xtask/src/feature_resolver.rsTrezor firmware debug buildsTrezor bootloader debug buildsTrezor prodtest debug buildsInspect captured patch +4 / −0
diff --git a/core/embed/xtask/src/feature_resolver.rs b/core/embed/xtask/src/feature_resolver.rs
index 814e945f..caadfe51 100644
--- a/core/embed/xtask/src/feature_resolver.rs
+++ b/core/embed/xtask/src/feature_resolver.rs
@@ -119,6 +119,10 @@ pub fn resolve_features(args: &BuildArgs) -> Result<ResolvedBuild> {
features.push("ui_performance_overlay".into());
}
+ if !pyopt {
+ features.push("ui_debug_overlay".into());
+ }
+
if args.debug_link.unwrap_or(!pyopt) {
features.push("debuglink".into());
features.push("ui_debug".into());
Why this scored 18/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.