feat(tests): attack_success 3-value UI, data classification badge, reorder containment options
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

This commit is contained in:
kitos
2026-07-06 16:19:50 +02:00
parent 022c1c756a
commit c0a88fc489
9 changed files with 236 additions and 50 deletions
+16 -3
View File
@@ -3,6 +3,8 @@ import type {
Test,
TestResult,
ContainmentResult,
AttackSuccessResult,
DataClassification,
TestState,
TestTimelineEntry,
} from "../types/models";
@@ -32,7 +34,7 @@ export interface RedUpdatePayload {
description?: string;
procedure_text?: string;
tool_used?: string;
attack_success?: boolean;
attack_success?: AttackSuccessResult;
red_summary?: string;
execution_start_time?: string;
execution_end_time?: string;
@@ -137,6 +139,17 @@ export async function updateTest(
return data;
}
/** Update the data classification label for a test (admin only). */
export async function updateTestClassification(
testId: string,
dataClassification: DataClassification,
): Promise<Test> {
const { data } = await client.patch<Test>(`/tests/${testId}/classification`, {
data_classification: dataClassification,
});
return data;
}
// ── Red Team ───────────────────────────────────────────────────────
/** Red Team updates their fields (draft, red_executing). */
@@ -365,7 +378,7 @@ export interface RTEvidenceEntry {
export interface RTTechniqueEntry {
mitre_id: string;
result: "detected" | "not_detected" | "partially_detected";
attack_success: boolean;
attack_success: AttackSuccessResult;
platform?: string;
notes?: string;
evidence: RTEvidenceEntry[]; // required — at least 1 image
@@ -382,7 +395,7 @@ export interface RTImportPayload {
export interface RTImportResult {
created: number;
skipped: number;
items: { mitre_id: string; test_name: string; result: string; attack_success: boolean; evidence_attached: number }[];
items: { mitre_id: string; test_name: string; result: string; attack_success: AttackSuccessResult; evidence_attached: number }[];
warnings: { mitre_id: string; reason: string }[];
engagement: string;
}