UNPKG

@mitre-attack/attack-data-model

Version:

A TypeScript API for the MITRE ATT&CK data model

41 lines (38 loc) 1.33 kB
import { attackBaseDomainObjectSchema } from "./chunk-ZQ5CIHH7.js"; import { xMitreContributorsSchema, xMitreDomainsSchema, xMitreModifiedByRefSchema } from "./chunk-Z7F5EWOT.js"; import { createAttackExternalReferencesSchema } from "./chunk-QY7EQ3UO.js"; import { createStixIdValidator } from "./chunk-OM2DJ5DL.js"; import { createStixTypeValidator } from "./chunk-5JU73PGM.js"; // src/schemas/sdo/detection-strategy.schema.ts import { z } from "zod/v4"; var extensibleDetectionStrategySchema = attackBaseDomainObjectSchema.extend({ id: createStixIdValidator("x-mitre-detection-strategy"), type: createStixTypeValidator("x-mitre-detection-strategy"), external_references: createAttackExternalReferencesSchema("x-mitre-detection-strategy"), x_mitre_modified_by_ref: xMitreModifiedByRefSchema, x_mitre_contributors: xMitreContributorsSchema, x_mitre_analytics: z.array(createStixIdValidator("x-mitre-analytic")).nonempty(), x_mitre_domains: xMitreDomainsSchema }).required({ created_by_ref: true, object_marking_refs: true }).meta({ description: "The detection logic and patterns used to identify malicious activities based on the collected data." }); var detectionStrategySchema = extensibleDetectionStrategySchema; export { extensibleDetectionStrategySchema, detectionStrategySchema };