fix: use profile dir for Tropic model output
What changed, and why it matters
This is a small fix in Trezor's internal emulator tooling. It changes where a helper program (the 'Tropic model') writes its output file, so the file goes into a per-profile directory instead of an unspecified default location. The change only affects internal test/development infrastructure and does not appear to fix a vulnerability in the actual Trezor hardware wallet or its firmware.
No security action required. Treat as a normal development/maintenance fix. If reviewing the broader emulator, verify that profile_dir is always a trusted, sanitized path before use.
Security signals we found
Path/output location change for internal emulator component
No changelog entry suggests routine tooling fix
No input validation, parsing, or cryptographic code changed
No references to vulnerabilities, CVEs, or security reports in commit message
Evidence from the diff
The commit modifies python/src/trezorlib/_internal/emulator.py. The TropicModel class now accepts a profile_dir argument and passes it via a new -o flag to the external tropic model process, directing tropic_model_config_output.yml into the profile directory. Previously the output location was not explicitly set. This is a path/output hygiene change for the emulator’s Tropic (secure-element simulation) integration. There is no evidence in the diff of a memory safety bug, cryptographic flaw, or user-data exposure.
Changed components
python/src/trezorlib/_internal/emulator.pyTropicModel classCoreEmulator classInspect captured patch +5 / −0
diff --git a/python/src/trezorlib/_internal/emulator.py b/python/src/trezorlib/_internal/emulator.py
index 08499228a..9ee093e48 100644
--- a/python/src/trezorlib/_internal/emulator.py
+++ b/python/src/trezorlib/_internal/emulator.py
@@ -53,11 +53,13 @@ class TropicModel:
def __init__(
self,
workdir: Path,
+ profile_dir: Path,
port: int,
configfile: str,
logfile: Union[TextIO, str, Path],
) -> None:
self.workdir = workdir
+ self.profile_dir = profile_dir
self.port = port
self.configfile = configfile
self.logfile = logfile
@@ -106,6 +108,8 @@ class TropicModel:
self.configfile,
"-p",
str(self.port),
+ "-o",
+ str(self.profile_dir / "tropic_model_config_output.yml"),
],
cwd=self.workdir,
stdout=cast(TextIO, output),
@@ -383,6 +387,7 @@ class CoreEmulator(Emulator):
assert tropic_model_configfile
self.tropic_model = TropicModel(
workdir=self.workdir,
+ profile_dir=self.profile_dir,
port=tropic_model_port,
configfile=tropic_model_configfile,
logfile=(
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.