--- id: stix2-validator version: "3.3.1" license: unclear license_treatment: permissive maintenance: active --- # stix2-validator — APIs and scripts for validating STIX 2.x documents. License: permissive · Maintenance: active · Downloads: 148.4K/mo ## What it is and what it does The STIX Validator is a tool for checking that STIX JSON content conforms to the STIX 2.1 specification. It validates documents against both mandatory "MUST" requirements—using JSON schemas and Python functions for checks that cannot be expressed in schema alone—and recommended "SHOULD" best-practice requirements. The validator distinguishes between these two requirement types, allowing users to ignore best-practice checks if needed. It also color-codes output to make validation results easier to interpret at a glance. The package works as both a command-line script (stix2_validator) and a library that can be integrated into other tools. Users can validate JSON files, JSON strings, or Python dictionaries representing STIX objects. It is maintained as an OASIS TC Open Repository under BSD-3-Clause licensing, with active governance and community participation. Use it for: - Validate STIX threat intelligence documents before ingestion into security platforms or databases. - Integrate STIX validation into CI/CD pipelines to enforce specification compliance in automated threat data workflows. - Check STIX JSON files for both mandatory conformance and best-practice adherence during threat intelligence authoring. - Build custom security tools that need to verify STIX object structure and content before processing. - Audit existing STIX document collections for specification violations and best-practice gaps. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Validates STIX 2.x JSON documents against the STIX 2.1 specification, checking both mandatory requirements via JSON schemas and recommended best practices via Python functions. Yes. The package is actively maintained, has low install friction, carries a permissive license, and fills a clear need for STIX 2.x validation in threat intelligence workflows. No known vulnerabilities and broad Python version support (3.10–3.14) make it a safe, reliable choice for projects requiring STIX conformance checking. ## Install pip install stix2-validator uv add stix2-validator poetry add stix2-validator ## Installing stix2-validator Before you install: Low friction install with 7 common runtime dependencies and a pure-Python wheel distribution. Actively maintained with a recent release 94 days ago and ongoing repository activity. License in practice: BSD-3-Clause permissive license allows commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install stix2-validator from stix2validator import validate_file, print_results results = validate_file("stix_file.json") print_results(results) Requires Python 3.10 or later. Verify before relying: - Whether the validator supports custom STIX objects when the type-checking option is disabled. - Performance characteristics when validating large STIX document collections. - Whether all STIX 2.1 specification updates are covered in the current release. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 148.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags stix validation, stix 2.x validator, json schema validation, cyber threat intelligence, stix document checker, compliance validation, stix conformance, stix, threat-intelligence, json-validation [View on SkillFed](https://skillfed.io/packages/stix2-validator) · [View on PyPI](https://pypi.org/project/stix2-validator/)