UNPKG

@mitre-attack/attack-data-model

Version:

A TypeScript API for the MITRE ATT&CK data model

187 lines (184 loc) 8.75 kB
import { z } from 'zod/v4'; declare const attackBaseDomainObjectSchema: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<{ file: "file"; "attack-pattern": "attack-pattern"; bundle: "bundle"; campaign: "campaign"; "course-of-action": "course-of-action"; "extension-definition": "extension-definition"; identity: "identity"; "intrusion-set": "intrusion-set"; malware: "malware"; tool: "tool"; "marking-definition": "marking-definition"; "x-mitre-analytic": "x-mitre-analytic"; "x-mitre-data-component": "x-mitre-data-component"; "x-mitre-detection-strategy": "x-mitre-detection-strategy"; "x-mitre-tactic": "x-mitre-tactic"; "x-mitre-asset": "x-mitre-asset"; "x-mitre-data-source": "x-mitre-data-source"; "x-mitre-matrix": "x-mitre-matrix"; "x-mitre-collection": "x-mitre-collection"; relationship: "relationship"; artifact: "artifact"; }>; spec_version: z.ZodLiteral<"2.1">; created: z.ZodISODateTime; modified: z.ZodISODateTime; created_by_ref: z.ZodOptional<z.ZodString & z.ZodType<`identity--${string}`, string, z.core.$ZodTypeInternals<`identity--${string}`, string>>>; labels: z.ZodOptional<z.ZodArray<z.ZodString>>; revoked: z.ZodOptional<z.ZodBoolean>; confidence: z.ZodOptional<z.ZodOptional<z.ZodNumber>>; lang: z.ZodOptional<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.ZodOptional<z.ZodArray<z.ZodString>>; granular_markings: z.ZodOptional<z.ZodArray<z.ZodObject<{ lang: z.ZodOptional<z.ZodString>; marking_ref: z.ZodOptional<z.ZodString>; selectors: z.ZodArray<z.ZodString>; }, z.core.$strip>>>; 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>]>>>; name: z.ZodString; x_mitre_attack_spec_version: z.ZodString; x_mitre_version: z.ZodString; x_mitre_old_attack_id: z.ZodOptional<z.ZodString & z.ZodType<`MOB-M${number}` | `MOB-S${number}`, string, z.core.$ZodTypeInternals<`MOB-M${number}` | `MOB-S${number}`, string>>>; x_mitre_deprecated: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>; declare const attackBaseRelationshipObjectSchema: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<{ file: "file"; "attack-pattern": "attack-pattern"; bundle: "bundle"; campaign: "campaign"; "course-of-action": "course-of-action"; "extension-definition": "extension-definition"; identity: "identity"; "intrusion-set": "intrusion-set"; malware: "malware"; tool: "tool"; "marking-definition": "marking-definition"; "x-mitre-analytic": "x-mitre-analytic"; "x-mitre-data-component": "x-mitre-data-component"; "x-mitre-detection-strategy": "x-mitre-detection-strategy"; "x-mitre-tactic": "x-mitre-tactic"; "x-mitre-asset": "x-mitre-asset"; "x-mitre-data-source": "x-mitre-data-source"; "x-mitre-matrix": "x-mitre-matrix"; "x-mitre-collection": "x-mitre-collection"; relationship: "relationship"; artifact: "artifact"; }>; spec_version: z.ZodLiteral<"2.1">; created: z.ZodISODateTime; modified: z.ZodISODateTime; created_by_ref: z.ZodOptional<z.ZodString & z.ZodType<`identity--${string}`, string, z.core.$ZodTypeInternals<`identity--${string}`, string>>>; labels: z.ZodOptional<z.ZodArray<z.ZodString>>; revoked: z.ZodOptional<z.ZodBoolean>; confidence: z.ZodOptional<z.ZodOptional<z.ZodNumber>>; lang: z.ZodOptional<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.ZodOptional<z.ZodArray<z.ZodString>>; granular_markings: z.ZodOptional<z.ZodArray<z.ZodObject<{ lang: z.ZodOptional<z.ZodString>; marking_ref: z.ZodOptional<z.ZodString>; selectors: z.ZodArray<z.ZodString>; }, z.core.$strip>>>; 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>]>>>; name: z.ZodString; x_mitre_attack_spec_version: z.ZodString; x_mitre_version: z.ZodString; x_mitre_old_attack_id: z.ZodOptional<z.ZodString & z.ZodType<`MOB-M${number}` | `MOB-S${number}`, string, z.core.$ZodTypeInternals<`MOB-M${number}` | `MOB-S${number}`, string>>>; x_mitre_deprecated: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>; declare const attackBaseMetaObjectSchema: z.ZodObject<{ type: z.ZodEnum<{ file: "file"; "attack-pattern": "attack-pattern"; bundle: "bundle"; campaign: "campaign"; "course-of-action": "course-of-action"; "extension-definition": "extension-definition"; identity: "identity"; "intrusion-set": "intrusion-set"; malware: "malware"; tool: "tool"; "marking-definition": "marking-definition"; "x-mitre-analytic": "x-mitre-analytic"; "x-mitre-data-component": "x-mitre-data-component"; "x-mitre-detection-strategy": "x-mitre-detection-strategy"; "x-mitre-tactic": "x-mitre-tactic"; "x-mitre-asset": "x-mitre-asset"; "x-mitre-data-source": "x-mitre-data-source"; "x-mitre-matrix": "x-mitre-matrix"; "x-mitre-collection": "x-mitre-collection"; relationship: "relationship"; artifact: "artifact"; }>; id: z.ZodString; lang: z.ZodOptional<z.ZodString>; spec_version: z.ZodLiteral<"2.1">; created_by_ref: z.ZodOptional<z.ZodString & z.ZodType<`identity--${string}`, string, z.core.$ZodTypeInternals<`identity--${string}`, string>>>; name: z.ZodString; created: z.ZodISODateTime; 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.ZodOptional<z.ZodArray<z.ZodString>>; granular_markings: z.ZodOptional<z.ZodArray<z.ZodObject<{ lang: z.ZodOptional<z.ZodString>; marking_ref: z.ZodOptional<z.ZodString>; selectors: z.ZodArray<z.ZodString>; }, z.core.$strip>>>; confidence: z.ZodOptional<z.ZodOptional<z.ZodNumber>>; 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_version: z.ZodString; x_mitre_old_attack_id: z.ZodOptional<z.ZodString & z.ZodType<`MOB-M${number}` | `MOB-S${number}`, string, z.core.$ZodTypeInternals<`MOB-M${number}` | `MOB-S${number}`, string>>>; x_mitre_deprecated: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>; type AttackBaseSDO = z.infer<typeof attackBaseDomainObjectSchema>; type AttackBaseSRO = z.infer<typeof attackBaseRelationshipObjectSchema>; type AttackBaseSMO = z.infer<typeof attackBaseRelationshipObjectSchema>; export { type AttackBaseSDO, type AttackBaseSMO, type AttackBaseSRO, attackBaseDomainObjectSchema, attackBaseMetaObjectSchema, attackBaseRelationshipObjectSchema };