@mitre-attack/attack-data-model
Version:
A TypeScript API for the MITRE ATT&CK data model
41 lines (38 loc) • 1.3 kB
JavaScript
import {
attackBaseDomainObjectSchema
} from "./chunk-V2FCJ647.js";
import {
createAttackExternalReferencesSchema
} from "./chunk-GCXWJREL.js";
import {
xMitreContributorsSchema,
xMitreModifiedByRefSchema
} from "./chunk-IE6R5TVY.js";
import {
createStixIdValidator
} from "./chunk-E3OY6DRE.js";
import {
createStixTypeValidator
} from "./chunk-PFSYT437.js";
import {
xMitreDomainsSchema
} from "./chunk-ZEHAFUHO.js";
// src/schemas/sdo/detection-strategy.schema.ts
import { z } from "zod/v4";
var detectionStrategySchema = 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_analytic_refs: z.array(createStixIdValidator("x-mitre-analytic")).min(1, { error: "At least one analytic ref is required" }),
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."
});
export {
detectionStrategySchema
};