UNPKG

@mitre-attack/attack-data-model

Version:

A TypeScript API for the MITRE ATT&CK data model

11 lines (8 loc) 832 B
import { z } from 'zod'; import { StixType } from './stix-type.js'; type AttackTypesWithAttackIds = 'tactic' | 'technique' | 'subtechnique' | 'group' | 'software' | 'mitigation' | 'asset' | 'data-source' | 'campaign'; type StixTypesWithAttackIds = Extract<StixType, 'x-mitre-tactic' | 'attack-pattern' | 'intrusion-set' | 'malware' | 'tool' | 'course-of-action' | 'x-mitre-asset' | 'x-mitre-data-source' | 'campaign'>; declare const stixTypeToAttackIdMapping: Record<StixTypesWithAttackIds, AttackTypesWithAttackIds>; declare const attackIdPatterns: Record<AttackTypesWithAttackIds, RegExp>; declare const createAttackIdSchema: (stixType: StixTypesWithAttackIds) => z.ZodString | z.ZodEffects<z.ZodString, string, string>; export { type StixTypesWithAttackIds, attackIdPatterns, createAttackIdSchema, stixTypeToAttackIdMapping };