UNPKG

@mitre-attack/attack-data-model

Version:

A TypeScript API for the MITRE ATT&CK data model

91 lines (88 loc) 3.09 kB
import { z } from 'zod'; /** * Schema for validating a single platform value. * * Validates that a platform string is one of the supported ATT&CK platforms. * * @example * ```typescript * xMitrePlatformSchema.parse('Windows'); // Valid * xMitrePlatformSchema.parse('Linux'); // Valid * xMitrePlatformSchema.parse('FreeBSD'); // Invalid - not a supported platform * ``` */ declare const xMitrePlatformSchema: z.ZodEnum<{ "Field Controller/RTU/PLC/IED": "Field Controller/RTU/PLC/IED"; "Network Devices": "Network Devices"; "Data Historian": "Data Historian"; "Google Workspace": "Google Workspace"; "Office Suite": "Office Suite"; ESXi: "ESXi"; "Identity Provider": "Identity Provider"; Containers: "Containers"; "Azure AD": "Azure AD"; "Engineering Workstation": "Engineering Workstation"; "Control Server": "Control Server"; "Human-Machine Interface": "Human-Machine Interface"; Windows: "Windows"; Linux: "Linux"; IaaS: "IaaS"; None: "None"; iOS: "iOS"; PRE: "PRE"; SaaS: "SaaS"; "Input/Output Server": "Input/Output Server"; macOS: "macOS"; Android: "Android"; "Safety Instrumented System/Protection Relay": "Safety Instrumented System/Protection Relay"; Embedded: "Embedded"; }>; /** * Type representing a single validated platform. */ type XMitrePlatform = z.infer<typeof xMitrePlatformSchema>; /** * Schema for validating platform lists (`x_mitre_platforms`). * * An array of platforms that apply to the ATT&CK object. Must contain at least one * platform, and all platforms must be unique (no duplicates). * * @example * ```typescript * xMitrePlatformsSchema.parse(['Windows', 'Linux']); // Valid * xMitrePlatformsSchema.parse(['Windows']); // Valid * xMitrePlatformsSchema.parse([]); // Invalid - at least one required * xMitrePlatformsSchema.parse(['Windows', 'Windows']); // Invalid - duplicates not allowed * ``` */ declare const xMitrePlatformsSchema: z.ZodArray<z.ZodEnum<{ "Field Controller/RTU/PLC/IED": "Field Controller/RTU/PLC/IED"; "Network Devices": "Network Devices"; "Data Historian": "Data Historian"; "Google Workspace": "Google Workspace"; "Office Suite": "Office Suite"; ESXi: "ESXi"; "Identity Provider": "Identity Provider"; Containers: "Containers"; "Azure AD": "Azure AD"; "Engineering Workstation": "Engineering Workstation"; "Control Server": "Control Server"; "Human-Machine Interface": "Human-Machine Interface"; Windows: "Windows"; Linux: "Linux"; IaaS: "IaaS"; None: "None"; iOS: "iOS"; PRE: "PRE"; SaaS: "SaaS"; "Input/Output Server": "Input/Output Server"; macOS: "macOS"; Android: "Android"; "Safety Instrumented System/Protection Relay": "Safety Instrumented System/Protection Relay"; Embedded: "Embedded"; }>>; /** * Type representing a list of validated platforms. */ type XMitrePlatforms = z.infer<typeof xMitrePlatformsSchema>; export { type XMitrePlatform, type XMitrePlatforms, xMitrePlatformSchema, xMitrePlatformsSchema };