Skip to content

[BUG] Error loading latest enterprise-attack data #67

@DT-Jasper

Description

@DT-Jasper

Describe the bug

Retrieved data
file://./node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js:333
        throw new Error(".pick() cannot be used on object schemas containing refinements");
              ^

Error: .pick() cannot be used on object schemas containing refinements
    at Module.pick (file://./node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js:333:15)
    at inst.pick (file://./node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js:570:32)
    at parseStixBundle (file://./node_modules/.pnpm/@mitre-attack+attack-data-model@4.10.0/node_modules/@mitre-attack/attack-data-model/dist/chunk-GV2GIHVE.js:158:56)
    at registerDataSource (file://./node_modules/.pnpm/@mitre-attack+attack-data-model@4.10.0/node_modules/@mitre-attack/attack-data-model/dist/chunk-GV2GIHVE.js:96:31)

Node.js v24.13.1

Expected behavior
Load data without throwing an error.

To Reproduce

import { DataSourceRegistration, loadDataModel, registerDataSource } from '@mitre-attack/attack-data-model';

const dataSource = new DataSourceRegistration({ source: 'attack', domain: 'enterprise-attack' });
const uuid = await registerDataSource(dataSource);
if (uuid) {
  const attackEnterpriseLatest = loadDataModel(uuid);

  const techniques = attackEnterpriseLatest.techniques;
  const tactics = attackEnterpriseLatest.tactics;
}

Additional context

$ node -v
v24.13.1
$ pnpm -v
10.22.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions