feat(prodtest): add `prodtest-model` command
What changed, and why it matters
This commit adds a new diagnostic command to Trezor's production-test firmware that simply reports the device's internal model name. It does not change normal user firmware, does not handle secrets, and does not appear to introduce any security issue. It is a straightforward read-only helper for factory testing.
No security action required. Review as a normal feature addition.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change introduces prodtest-model in core/embed/projects/prodtest/cmd/prodtest_prodtest.c. The command takes no arguments, validates argument count, and returns MODEL_INTERNAL_NAME via the CLI. The implementation mirrors the existing prodtest-version command and only exposes a compile-time model identifier string.
Changed components
core/embed/projects/prodtest/cmd/prodtest_prodtest.cInspect captured patch +16 / −0
diff --git a/core/embed/projects/prodtest/cmd/prodtest_prodtest.c b/core/embed/projects/prodtest/cmd/prodtest_prodtest.c
index 26d61efe..0f91cb1b 100644
--- a/core/embed/projects/prodtest/cmd/prodtest_prodtest.c
+++ b/core/embed/projects/prodtest/cmd/prodtest_prodtest.c
@@ -48,6 +48,15 @@ static void prodtest_prodtest_intro(cli_t* cli) {
cli_trace(cli, "");
}
+static void prodtest_prodtest_model(cli_t* cli) {
+ if (cli_arg_count(cli) > 0) {
+ cli_error_arg_count(cli);
+ return;
+ }
+
+ cli_ok(cli, "%s", MODEL_INTERNAL_NAME);
+}
+
static void prodtest_prodtest_version(cli_t* cli) {
if (cli_arg_count(cli) > 0) {
cli_error_arg_count(cli);
@@ -135,6 +144,13 @@ PRODTEST_CLI_CMD(
.args = "",
);
+PRODTEST_CLI_CMD(
+ .name = "prodtest-model",
+ .func = prodtest_prodtest_model,
+ .info = "Retrieve the internal model name",
+ .args = "",
+);
+
PRODTEST_CLI_CMD(
.name = "prodtest-version",
.func = prodtest_prodtest_version,
Why this scored 16/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.