feat(frontend): render markdown in description and summary fields

- New shared MarkdownText component (react-markdown + remark-gfm)
  that renders links, bold, italic, lists, code, blockquotes.
  External links open in a new tab with rel=noopener.
- Applied to: technique description, threat actor description,
  test description, campaign description, detection rule descriptions,
  D3FEND defense descriptions, red/blue summaries and validation notes.
- procedure_text (code/commands) stays in <pre> — not processed as MD.
This commit is contained in:
kitos
2026-05-29 08:38:53 +02:00
parent 366fc2170c
commit 1c27e31101
7 changed files with 132 additions and 18 deletions
+2 -3
View File
@@ -1,4 +1,5 @@
import { useParams, useNavigate } from "react-router-dom";
import MarkdownText from "../components/MarkdownText";
import { useQuery } from "@tanstack/react-query";
import {
Loader2,
@@ -263,9 +264,7 @@ export default function ThreatActorDetailPage() {
<h2 className="mb-3 text-sm font-semibold uppercase tracking-wider text-gray-500">
Description
</h2>
<p className="text-sm leading-relaxed text-gray-300 whitespace-pre-line">
{actor.description}
</p>
<MarkdownText content={actor.description} className="text-sm leading-relaxed text-gray-300" />
</div>
)}