@mitre-attack/attack-data-model
Version:
A TypeScript API for the MITRE ATT&CK data model
67 lines (64 loc) • 3.52 kB
TypeScript
import { z } from 'zod';
import { Malware } from './malware.schema.js';
import { Asset } from './asset.schema.js';
import { Campaign } from './campaign.schema.js';
import { DataComponent } from './data-component.schema.js';
import { DataSource } from './data-source.schema.js';
import { Identity } from './identity.schema.js';
import { Matrix } from './matrix.schema.js';
import { Tool } from './tool.schema.js';
import { Tactic } from './tactic.schema.js';
import { Technique } from './technique.schema.js';
import { Group } from './group.schema.js';
import { Mitigation } from './mitigation.schema.js';
import { Collection } from './collection.schema.js';
import { Relationship } from '../sro/relationship.schema.js';
import { MarkingDefinition } from '../smo/marking-definition.schema.js';
import '../common/stix-type.js';
type AttackObject = Malware | Asset | Campaign | Collection | DataComponent | DataSource | Identity | Matrix | Tool | Tactic | Technique | Group | Mitigation | Relationship | MarkingDefinition;
declare const attackObjectsSchema: z.ZodTypeAny;
type AttackObjects = z.infer<typeof attackObjectsSchema>;
declare const extensibleStixBundleSchema: z.ZodObject<{
id: z.ZodEffects<z.ZodEffects<z.ZodString, `attack-pattern--${string}` | `bundle--${string}` | `campaign--${string}` | `course-of-action--${string}` | `identity--${string}` | `intrusion-set--${string}` | `malware--${string}` | `tool--${string}` | `marking-definition--${string}` | `x-mitre-data-component--${string}` | `x-mitre-data-source--${string}` | `x-mitre-tactic--${string}` | `x-mitre-asset--${string}` | `x-mitre-matrix--${string}` | `x-mitre-collection--${string}` | `relationship--${string}` | `file--${string}` | `artifact--${string}`, string>, `bundle--${string}`, string>;
type: z.ZodEffects<z.ZodString, string, string>;
spec_version: z.ZodLiteral<"2.0" | "2.1">;
objects: z.ZodTypeAny;
}, "strict", z.ZodTypeAny, {
type: string;
id: `bundle--${string}`;
spec_version: "2.0" | "2.1";
objects?: any;
}, {
type: string;
id: string;
spec_version: "2.0" | "2.1";
objects?: any;
}>;
declare const stixBundleSchema: z.ZodEffects<z.ZodObject<{
id: z.ZodEffects<z.ZodEffects<z.ZodString, `attack-pattern--${string}` | `bundle--${string}` | `campaign--${string}` | `course-of-action--${string}` | `identity--${string}` | `intrusion-set--${string}` | `malware--${string}` | `tool--${string}` | `marking-definition--${string}` | `x-mitre-data-component--${string}` | `x-mitre-data-source--${string}` | `x-mitre-tactic--${string}` | `x-mitre-asset--${string}` | `x-mitre-matrix--${string}` | `x-mitre-collection--${string}` | `relationship--${string}` | `file--${string}` | `artifact--${string}`, string>, `bundle--${string}`, string>;
type: z.ZodEffects<z.ZodString, string, string>;
spec_version: z.ZodLiteral<"2.0" | "2.1">;
objects: z.ZodTypeAny;
}, "strict", z.ZodTypeAny, {
type: string;
id: `bundle--${string}`;
spec_version: "2.0" | "2.1";
objects?: any;
}, {
type: string;
id: string;
spec_version: "2.0" | "2.1";
objects?: any;
}>, {
type: string;
id: `bundle--${string}`;
spec_version: "2.0" | "2.1";
objects?: any;
}, {
type: string;
id: string;
spec_version: "2.0" | "2.1";
objects?: any;
}>;
type StixBundle = z.infer<typeof extensibleStixBundleSchema>;
export { type AttackObject, type AttackObjects, type StixBundle, attackObjectsSchema, extensibleStixBundleSchema, stixBundleSchema };