refactor(tests): merge detect_suggested_procedure into expected_detection
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
Two overlapping TestTemplate fields (expected_detection: narrative guidance from imports/leads; detect_suggested_procedure: concrete commands from approved suggestions) are now one. Blue-side procedure suggestions target expected_detection directly, appending onto whatever is already there rather than overwriting it — same merge-not-overwrite behavior already used for the red side. Existing detect_suggested_procedure data is folded into expected_detection before the column is dropped.
This commit is contained in:
@@ -24,7 +24,6 @@ export interface CreateTemplatePayload {
|
||||
source_url?: string;
|
||||
attack_procedure?: string;
|
||||
expected_detection?: string;
|
||||
detect_suggested_procedure?: string;
|
||||
platform?: string;
|
||||
tool_suggested?: string;
|
||||
severity?: string;
|
||||
|
||||
@@ -221,19 +221,6 @@ export default function TestFromTemplateForm({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Detect Suggested Procedure (read-only reference for Blue Team) */}
|
||||
<div>
|
||||
<label className="mb-1.5 block text-sm font-medium text-gray-300">
|
||||
Detect Suggested Procedure
|
||||
<span className="ml-2 text-xs text-gray-500">(read-only reference for Blue Team)</span>
|
||||
</label>
|
||||
<div className="rounded-lg border border-gray-700 bg-gray-800/50 p-3">
|
||||
<p className="whitespace-pre-wrap font-mono text-sm text-gray-400">
|
||||
{template?.detect_suggested_procedure || "No detection procedure suggested yet."}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Error */}
|
||||
{createMutation.isError && (
|
||||
<div className="rounded-lg border border-red-500/30 bg-red-900/20 p-3 text-sm text-red-400">
|
||||
|
||||
@@ -1355,7 +1355,6 @@ function CreateTemplateForm({
|
||||
source: "custom",
|
||||
attack_procedure: "",
|
||||
expected_detection: "",
|
||||
detect_suggested_procedure: "",
|
||||
platform: "",
|
||||
tool_suggested: "",
|
||||
severity: "",
|
||||
@@ -1486,22 +1485,8 @@ function CreateTemplateForm({
|
||||
<textarea
|
||||
value={form.expected_detection || ""}
|
||||
onChange={(e) => setForm({ ...form, expected_detection: e.target.value })}
|
||||
placeholder="What the blue team should detect..."
|
||||
rows={2}
|
||||
className="w-full rounded-lg border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-gray-300 placeholder-gray-500 focus:border-cyan-500 focus:outline-none"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Detect Suggested Procedure */}
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-300 mb-1">
|
||||
Detect Suggested Procedure
|
||||
</label>
|
||||
<textarea
|
||||
value={form.detect_suggested_procedure || ""}
|
||||
onChange={(e) => setForm({ ...form, detect_suggested_procedure: e.target.value })}
|
||||
placeholder="Steps for the blue team to detect this technique..."
|
||||
rows={3}
|
||||
placeholder="What the blue team should detect, and how (commands/queries)..."
|
||||
rows={4}
|
||||
className="w-full rounded-lg border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-gray-300 placeholder-gray-500 focus:border-cyan-500 focus:outline-none"
|
||||
/>
|
||||
</div>
|
||||
@@ -1580,7 +1565,6 @@ function TemplateDetailModal({
|
||||
description: template.description ?? "",
|
||||
attack_procedure: template.attack_procedure ?? "",
|
||||
expected_detection: template.expected_detection ?? "",
|
||||
detect_suggested_procedure: template.detect_suggested_procedure ?? "",
|
||||
platform: template.platform ?? "",
|
||||
tool_suggested: template.tool_suggested ?? "",
|
||||
severity: template.severity ?? "",
|
||||
@@ -1707,17 +1691,7 @@ function TemplateDetailModal({
|
||||
<textarea
|
||||
value={form.expected_detection ?? ""}
|
||||
onChange={(e) => setForm({ ...form, expected_detection: e.target.value })}
|
||||
rows={2}
|
||||
className="w-full rounded-lg border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-gray-300 focus:border-cyan-500 focus:outline-none"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-300 mb-1">Detect Suggested Procedure</label>
|
||||
<textarea
|
||||
value={form.detect_suggested_procedure ?? ""}
|
||||
onChange={(e) => setForm({ ...form, detect_suggested_procedure: e.target.value })}
|
||||
rows={3}
|
||||
rows={4}
|
||||
className="w-full rounded-lg border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-gray-300 focus:border-cyan-500 focus:outline-none"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -230,7 +230,6 @@ export interface TestTemplate {
|
||||
source_url: string | null;
|
||||
attack_procedure: string | null;
|
||||
expected_detection: string | null;
|
||||
detect_suggested_procedure: string | null;
|
||||
platform: string | null;
|
||||
tool_suggested: string | null;
|
||||
severity: string | null;
|
||||
|
||||
Reference in New Issue
Block a user