-
Notifications
You must be signed in to change notification settings - Fork 0
fix(report): harden generic diagnostics title trust boundary #999
Copy link
Copy link
Closed
Labels
area: apiAPI, protocol, event, or external contractAPI, protocol, event, or external contractarea: securitySecurity boundary, hardening, or vulnerability preventionSecurity boundary, hardening, or vulnerability preventionpriority: mediumNormal-priority or P2 workNormal-priority or P2 workstatus: triagedOpen issue has an organization taxonomy assignmentOpen issue has an organization taxonomy assignmenttype: bugDefect or incorrect behaviorDefect or incorrect behavior
Description
Activity
Metadata
Metadata
Assignees
Labels
area: apiAPI, protocol, event, or external contractAPI, protocol, event, or external contractarea: securitySecurity boundary, hardening, or vulnerability preventionSecurity boundary, hardening, or vulnerability preventionpriority: mediumNormal-priority or P2 workNormal-priority or P2 workstatus: triagedOpen issue has an organization taxonomy assignmentOpen issue has an organization taxonomy assignmenttype: bugDefect or incorrect behaviorDefect or incorrect behavior
Defect
Protected main's public
render_diagnostics_report()resolvestitlewithtitle or _default_title(...)and later passes the value tohtml.escape(). A caller-controlledstrsubclass can therefore execute overridden__bool__during title resolution or overriddenreplace()during HTML escaping.Required contract
Noneor an exact built-instrat the generic diagnostics report boundary.strsubclasses with a package-ownedValueErrorbefore any caller callback can execute.Noneand an empty exact built-in string select the report-type default title.__bool__/replacecallback dispatch and no output artifact on rejection.Single-writer scope
python/fast_mlsirm/report.pyis currently owned by #978. Implement this as a direct child of #978's exact head rather than opening a competing main-based writer. The child may touch only the title admission boundary, a focused test, and a governed changelog fragment. No statistical or psychometric arithmetic changes.