feat(frontend): render markdown in description and summary fields
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
- 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. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useState } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import MarkdownText from "../MarkdownText";
|
||||
import {
|
||||
Shield,
|
||||
ShieldCheck,
|
||||
@@ -205,7 +206,7 @@ export default function TeamTabs({
|
||||
placeholder="Summarize the Red Team findings..."
|
||||
/>
|
||||
) : (
|
||||
<p className="text-sm text-gray-400">{test.red_summary || "No summary yet."}</p>
|
||||
<MarkdownText content={test.red_summary || "No summary yet."} className="text-sm text-gray-400" />
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -250,7 +251,7 @@ export default function TeamTabs({
|
||||
</span>
|
||||
</div>
|
||||
{test.red_validation_notes && (
|
||||
<p className="mt-2 text-sm text-gray-400">{test.red_validation_notes}</p>
|
||||
<MarkdownText content={test.red_validation_notes} className="mt-2 text-sm text-gray-400" />
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
@@ -317,7 +318,7 @@ export default function TeamTabs({
|
||||
placeholder="Summarize the Blue Team analysis..."
|
||||
/>
|
||||
) : (
|
||||
<p className="text-sm text-gray-400">{test.blue_summary || "No summary yet."}</p>
|
||||
<MarkdownText content={test.blue_summary || "No summary yet."} className="text-sm text-gray-400" />
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -424,7 +425,7 @@ export default function TeamTabs({
|
||||
</span>
|
||||
</div>
|
||||
{test.blue_validation_notes && (
|
||||
<p className="mt-2 text-sm text-gray-400">{test.blue_validation_notes}</p>
|
||||
<MarkdownText content={test.blue_validation_notes} className="mt-2 text-sm text-gray-400" />
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
@@ -461,7 +462,7 @@ export default function TeamTabs({
|
||||
</div>
|
||||
<div>
|
||||
<dt className="text-xs font-medium uppercase text-gray-500">Summary</dt>
|
||||
<dd className="mt-0.5 text-sm text-gray-300">{test.red_summary || "N/A"}</dd>
|
||||
<dd className="mt-0.5"><MarkdownText content={test.red_summary || "N/A"} className="text-sm text-gray-300" /></dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt className="text-xs font-medium uppercase text-gray-500">Evidence Files</dt>
|
||||
@@ -512,7 +513,7 @@ export default function TeamTabs({
|
||||
</div>
|
||||
<div>
|
||||
<dt className="text-xs font-medium uppercase text-gray-500">Summary</dt>
|
||||
<dd className="mt-0.5 text-sm text-gray-300">{test.blue_summary || "N/A"}</dd>
|
||||
<dd className="mt-0.5"><MarkdownText content={test.blue_summary || "N/A"} className="text-sm text-gray-300" /></dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt className="text-xs font-medium uppercase text-gray-500">Evidence Files</dt>
|
||||
|
||||
Reference in New Issue
Block a user