In this article
Keep external diagnostic values literal under the actual renderer, including per-message markup overrides.
The operational scenario
A model artifact filename appears inside a colored diagnostic message. The filename contains bracketed text, and the rendered report loses part of the name or displays an unexpected style or link. The underlying event can be accurate while its presentation becomes misleading. The security boundary here is interpretation by a renderer, rather than model instruction following or execution of the diagnostic string as a shell command.
The trust-boundary mechanism
Rich documents console markup parsing for strings and warns that dynamically inserted unescaped values can inject tags. Malformed markup can also raise MarkupError. Its logging handler differs: markup is disabled by default but can be enabled on the handler or for an individual record. A review must therefore inspect the actual output path and record options instead of assuming every Rich string is parsed or every logging message remains literal.
Define the control contract
Define which parts of the message are trusted formatting and which are external values. Select literal rendering or documented escaping for untrusted insertions, preserving the intended text. Keep this policy separate from redaction: correctly displayed text may still contain secrets. Also distinguish Rich markup from ANSI interpretation and other terminal behaviors; disabling one parser is not evidence that every possible display-control mechanism has been neutralized.
A step-by-step verification
First prepare synthetic labels containing ordinary brackets, unmatched tags and harmless style-like content. Render them through the actual console and logging paths in a disposable fixture, including any per-record override. Next apply the intended literal or escaping policy and compare the visible text with the original value. Preserve a plain structured record alongside the view so presentation changes cannot silently alter the event identity used for investigation.
Evidence required for acceptance
Acceptance requires renderer configuration, input fixture identity and an output comparison showing preserved literal values. Include a malformed-tag case to test that diagnostics do not disappear through an avoidable formatting exception. Do not count an attractive colored report as fidelity evidence. Confirm that trusted severity labels remain distinguishable from untrusted content, while a disabled logging default is not accidentally overridden by the application wrapper.
Failure cases and limits
This check does not establish shell safety, browser HTML safety or a universal terminal sanitizer. It examines a specific Rich interpretation boundary. If hyperlinks are deliberately supported, their origin and display policy need independent review. The useful result is a diagnostic interface whose external values remain recognizable as data, with source identity retained outside the styling layer and no invented claim that rendering alone validates the reported incident.
Primary references and related reading
Keep external diagnostic values literal under the actual renderer, including per-message markup overrides. Rich markup parsing and escaping; Rich logging markup activation.
The proposed investigation of rich untrusted diagnostic markup boundary is a proposed control review; no live security test was executed. Related reading: Inference API telemetry without default prompt capture; Request IDs and trace context across gateway, API and engine.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.