@mitre-attack/attack-data-model
Version:
A TypeScript API for the MITRE ATT&CK data model
178 lines (175 loc) • 8.05 kB
text/typescript
import { z } from 'zod/v4';
declare const extensibleIdentitySchema: z.ZodObject<{
type: z.ZodLiteral<"attack-pattern" | "bundle" | "campaign" | "course-of-action" | "extension-definition" | "identity" | "intrusion-set" | "malware" | "tool" | "marking-definition" | "x-mitre-analytic" | "x-mitre-data-component" | "x-mitre-detection-strategy" | "x-mitre-tactic" | "x-mitre-asset" | "x-mitre-data-source" | "x-mitre-log-source" | "x-mitre-matrix" | "x-mitre-collection" | "relationship" | "file" | "artifact">;
id: z.ZodString;
description: z.ZodOptional<z.ZodString>;
spec_version: z.ZodEnum<{
"2.0": "2.0";
2.1: "2.1";
}>;
created_by_ref: z.ZodOptional<z.ZodString>;
name: z.ZodString;
created: z.core.$ZodBranded<z.ZodISODateTime, "StixCreatedTimestamp">;
modified: z.core.$ZodBranded<z.ZodISODateTime, "StixModifiedTimestamp">;
revoked: z.ZodOptional<z.ZodBoolean>;
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
external_references: z.ZodOptional<z.ZodArray<z.ZodObject<{
source_name: z.ZodString;
description: z.ZodOptional<z.ZodString>;
url: z.ZodOptional<z.ZodURL>;
external_id: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
object_marking_refs: z.ZodArray<z.ZodString>;
granular_markings: z.ZodOptional<z.ZodArray<z.ZodObject<{
marking_ref: z.ZodString;
selectors: z.ZodArray<z.ZodString>;
}, z.core.$strip>>>;
confidence: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
lang: z.ZodOptional<z.ZodString>;
extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
extension_type: z.ZodEnum<{
"new-sdo": "new-sdo";
"new-sco": "new-sco";
"new-sro": "new-sro";
"property-extension": "property-extension";
"toplevel-property-extension": "toplevel-property-extension";
}>;
}, z.core.$catchall<z.ZodUnknown>>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>;
x_mitre_attack_spec_version: z.ZodString;
x_mitre_old_attack_id: z.ZodOptional<z.ZodString>;
x_mitre_deprecated: z.ZodOptional<z.ZodBoolean>;
identity_class: z.ZodEnum<{
group: "group";
individual: "individual";
system: "system";
organization: "organization";
class: "class";
unspecified: "unspecified";
}>;
roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
sectors: z.ZodOptional<z.ZodArray<z.ZodEnum<{
government: "government";
agriculture: "agriculture";
aerospace: "aerospace";
automotive: "automotive";
chemical: "chemical";
commercial: "commercial";
communications: "communications";
construction: "construction";
defense: "defense";
education: "education";
energy: "energy";
entertainment: "entertainment";
"financial-services": "financial-services";
"government-emergency-services": "government-emergency-services";
"government-local": "government-local";
"government-national": "government-national";
"government-public-services": "government-public-services";
"government-regional": "government-regional";
healthcare: "healthcare";
"hospitality-leisure": "hospitality-leisure";
infrastructure: "infrastructure";
"infrastructure-dams": "infrastructure-dams";
"infrastructure-nuclear": "infrastructure-nuclear";
"infrastructure-water": "infrastructure-water";
insurance: "insurance";
manufacturing: "manufacturing";
mining: "mining";
"non-profit": "non-profit";
pharmaceuticals: "pharmaceuticals";
retail: "retail";
technology: "technology";
telecommunications: "telecommunications";
transportation: "transportation";
utilities: "utilities";
}>>>;
contact_information: z.ZodOptional<z.ZodString>;
}, z.core.$strict>;
declare const identitySchema: z.ZodObject<{
type: z.ZodLiteral<"attack-pattern" | "bundle" | "campaign" | "course-of-action" | "extension-definition" | "identity" | "intrusion-set" | "malware" | "tool" | "marking-definition" | "x-mitre-analytic" | "x-mitre-data-component" | "x-mitre-detection-strategy" | "x-mitre-tactic" | "x-mitre-asset" | "x-mitre-data-source" | "x-mitre-log-source" | "x-mitre-matrix" | "x-mitre-collection" | "relationship" | "file" | "artifact">;
id: z.ZodString;
description: z.ZodOptional<z.ZodString>;
spec_version: z.ZodEnum<{
"2.0": "2.0";
2.1: "2.1";
}>;
created_by_ref: z.ZodOptional<z.ZodString>;
name: z.ZodString;
created: z.core.$ZodBranded<z.ZodISODateTime, "StixCreatedTimestamp">;
modified: z.core.$ZodBranded<z.ZodISODateTime, "StixModifiedTimestamp">;
revoked: z.ZodOptional<z.ZodBoolean>;
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
external_references: z.ZodOptional<z.ZodArray<z.ZodObject<{
source_name: z.ZodString;
description: z.ZodOptional<z.ZodString>;
url: z.ZodOptional<z.ZodURL>;
external_id: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
object_marking_refs: z.ZodArray<z.ZodString>;
granular_markings: z.ZodOptional<z.ZodArray<z.ZodObject<{
marking_ref: z.ZodString;
selectors: z.ZodArray<z.ZodString>;
}, z.core.$strip>>>;
confidence: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
lang: z.ZodOptional<z.ZodString>;
extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
extension_type: z.ZodEnum<{
"new-sdo": "new-sdo";
"new-sco": "new-sco";
"new-sro": "new-sro";
"property-extension": "property-extension";
"toplevel-property-extension": "toplevel-property-extension";
}>;
}, z.core.$catchall<z.ZodUnknown>>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>;
x_mitre_attack_spec_version: z.ZodString;
x_mitre_old_attack_id: z.ZodOptional<z.ZodString>;
x_mitre_deprecated: z.ZodOptional<z.ZodBoolean>;
identity_class: z.ZodEnum<{
group: "group";
individual: "individual";
system: "system";
organization: "organization";
class: "class";
unspecified: "unspecified";
}>;
roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
sectors: z.ZodOptional<z.ZodArray<z.ZodEnum<{
government: "government";
agriculture: "agriculture";
aerospace: "aerospace";
automotive: "automotive";
chemical: "chemical";
commercial: "commercial";
communications: "communications";
construction: "construction";
defense: "defense";
education: "education";
energy: "energy";
entertainment: "entertainment";
"financial-services": "financial-services";
"government-emergency-services": "government-emergency-services";
"government-local": "government-local";
"government-national": "government-national";
"government-public-services": "government-public-services";
"government-regional": "government-regional";
healthcare: "healthcare";
"hospitality-leisure": "hospitality-leisure";
infrastructure: "infrastructure";
"infrastructure-dams": "infrastructure-dams";
"infrastructure-nuclear": "infrastructure-nuclear";
"infrastructure-water": "infrastructure-water";
insurance: "insurance";
manufacturing: "manufacturing";
mining: "mining";
"non-profit": "non-profit";
pharmaceuticals: "pharmaceuticals";
retail: "retail";
technology: "technology";
telecommunications: "telecommunications";
transportation: "transportation";
utilities: "utilities";
}>>>;
contact_information: z.ZodOptional<z.ZodString>;
}, z.core.$strict>;
type Identity = z.infer<typeof extensibleIdentitySchema>;
export { type Identity, extensibleIdentitySchema, identitySchema };