@mitre-attack/attack-data-model
Version:
A TypeScript API for the MITRE ATT&CK data model
54 lines (51 loc) • 1.78 kB
JavaScript
import {
attackBaseDomainObjectSchema
} from "./chunk-ZHQVMLOZ.js";
import {
IdentityClassOV,
IndustrySectorOV
} from "./chunk-VOGK6XDT.js";
import {
objectMarkingRefsSchema
} from "./chunk-BUEHDLBB.js";
import {
descriptionSchema
} from "./chunk-DNIVZ2SM.js";
import {
createStixIdValidator
} from "./chunk-E3OY6DRE.js";
import {
createStixTypeValidator
} from "./chunk-PFSYT437.js";
import {
nonEmptyRequiredString,
stixListOfString
} from "./chunk-KFUJRXYX.js";
// src/schemas/sdo/identity.schema.ts
import { z } from "zod/v4";
var identitySchema = attackBaseDomainObjectSchema.extend({
id: createStixIdValidator("identity"),
type: createStixTypeValidator("identity"),
object_marking_refs: objectMarkingRefsSchema,
identity_class: IdentityClassOV.meta({
description: "The type of entity that this Identity describes, e.g., an individual or organization. This is an open vocabulary and the values SHOULD come from the identity-class-ov vocabulary"
}),
description: descriptionSchema.optional(),
// Not used in ATT&CK Identity but defined in STIX
roles: stixListOfString.optional().meta({
description: "The list of roles that this Identity performs"
}),
// Not used in ATT&CK Identity but defined in STIX
sectors: z.array(IndustrySectorOV).min(1).optional().meta({
description: "The list of industry sectors that this Identity belongs to. This is an open vocabulary and values SHOULD come from the industry-sector-ov vocabulary"
}),
// Not used in ATT&CK Identity but defined in STIX
contact_information: nonEmptyRequiredString.optional().meta({
description: "The contact information (e-mail, phone number, etc.) for this Identity"
})
}).omit({
x_mitre_version: true
}).strict();
export {
identitySchema
};