Skip to content

stixtests module unable to validate STIX with stix2-validator==3.3.1 #628

Description

@jondricek

The stixtests module cannot validate ATT&CK STIX bundles when this repository uses its currently pinned dependency, stix2-validator==3.3.1. For example:

$ uv run python update-attack.py -m clean -e stixtests
...
2026-08-05 10:07:45.316 | INFO     | modules.stixtests.stixtests:run_tests:47 - Validating STIX for domain: enterprise-attack
2026-08-05 10:07:45.540 | ERROR    | modules.stixtests.stixtests:run_tests:52 - File enterprise-attack.json is invalid:
[X] STIX JSON: Invalid
    [X] Cannot locate a schema for the object's type, nor the base schema (core.json).
2026-08-05 10:07:45.540 | INFO     | modules.stixtests.stixtests:run_tests:47 - Validating STIX for domain: mobile-attack
2026-08-05 10:07:45.560 | ERROR    | modules.stixtests.stixtests:run_tests:52 - File mobile-attack.json is invalid:
[X] STIX JSON: Invalid
    [X] Cannot locate a schema for the object's type, nor the base schema (core.json).
2026-08-05 10:07:45.560 | INFO     | modules.stixtests.stixtests:run_tests:47 - Validating STIX for domain: ics-attack
2026-08-05 10:07:45.575 | ERROR    | modules.stixtests.stixtests:run_tests:52 - File ics-attack.json is invalid:
[X] STIX JSON: Invalid
    [X] Cannot locate a schema for the object's type, nor the base schema (core.json).

Downgrading to stix2-validator==3.2.0 validates the same STIX content successfully:

$ uv pip install stix2-validator==3.2.0
$ uv run python update-attack.py -m clean -e stixtests
...
2026-08-05 10:36:13.990 | INFO     | modules.stixtests.stixtests:run_tests:47 - Validating STIX for domain: enterprise-attack
2026-08-05 10:37:55.376 | INFO     | modules.stixtests.stixtests:run_tests:50 - File enterprise-attack.json is valid
2026-08-05 10:37:55.376 | INFO     | modules.stixtests.stixtests:run_tests:47 - Validating STIX for domain: mobile-attack
2026-08-05 10:38:05.264 | INFO     | modules.stixtests.stixtests:run_tests:50 - File mobile-attack.json is valid
2026-08-05 10:38:05.264 | INFO     | modules.stixtests.stixtests:run_tests:47 - Validating STIX for domain: ics-attack
2026-08-05 10:38:12.549 | INFO     | modules.stixtests.stixtests:run_tests:50 - File ics-attack.json is valid

This appears to be caused by the upstream 3.3.1 wheel omitting the STIX schema JSON files. It matches oasis-open/cti-stix-validator#248.

Until an upstream fixed release is available, we should pin stix2-validator==3.2.0 so our stixtests extra/module can continue to perform STIX validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions