diff --git a/scripts/aidlc-traceability/docs/threat-model.md b/scripts/aidlc-traceability/docs/threat-model.md index a4c66fc6e..b613bed4c 100644 --- a/scripts/aidlc-traceability/docs/threat-model.md +++ b/scripts/aidlc-traceability/docs/threat-model.md @@ -180,20 +180,21 @@ No external network calls. All data stays local. ## Threat & Mitigation Detail -| Threat # | Priority | Threat | STRIDE | Affected Assets | Mitigations | Decision | Status | -| -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------------------- | ------------ | -------- | ---------------------------- | -| T-001 | High | TA1 injects malicious content into artifact markdown files to produce a misleading traceability report | Tampering | Artifact files, Reports | M-001, M-002 | Mitigate | Mitigated | -| T-002 | High | TA1 places ` must not break out + of the embedded JSON ', + artifact_type=ArtifactType.REQUIREMENT, + description='foo bar', + ) + ] + report = TraceabilityReport( + project_name="Proj", + artifacts=arts, + metrics=CoverageMetrics(total_requirements=1), + ) + G, _ = build_graph(arts, []) + html = generate_html(report, G) + + # The raw closing-tag sequences from the malicious title must never + # appear verbatim in the output; they must be neutralized to <\/ so the + # browser cannot terminate the " not in html + assert "<\\/script>