smithery.ai

stix2-validator

Validate STIX 2.1 JSON files and bundles against the STIX specification.

First seen Mar 19, 2026

Installation

$ npx skills add https://smithery.ai

Summary

  • Validate STIX 2.1 JSON files and bundles against the STIX specification.
  • Use when validating threat intelligence data, checking STIX bundle integrity before ingestion, verifying indicator/malware/attack-pattern objects have required fields, or bulk-validating directories of STIX files.
  • Provides detailed error reports showing which objects failed and why.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,044 B
  • docs SUMMARY.md 379 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

STIX 2.1 Validator

Validate STIX 2.1 JSON bundles using the official stix2-validator library.

Requirements

Install the validator library before use:

pip install stix2-validator --break-system-packages

Usage

Validate a Single File

python scripts/validate_stix.py /path/to/bundle.json

Validate a Directory

python scripts/validate_stix.py /path/to/stix_files/

Add -r for recursive subdirectory scanning.

Options

Option Description
--strict Enable all optional validation checks
--enforce-refs Warn when object references don't resolve within the bundle
-r, --recursive Recursively validate files in subdirectories
--json Output results as JSON for programmatic use
-q, --quiet Suppress success messages, show only errors

JSON Output

For integration with other tools, use --json:

python scripts/validate_stix.py bundle.json --json

Returns structured output:

{
  "file": "bundle.json",
  "valid": false,
  "errors": [
    {"id": "indicator--abc123", "type": "", "message": "'pattern_type' is a required property"}
  ],
  "warnings": []
}

Error Categories

The validator checks for:

  • Schema errors: Missing required properties, invalid property types
  • Format errors: Malformed UUIDs, invalid timestamps, incorrect ID formats
  • Reference errors: Unresolved object references (with --enforce-refs)
  • Semantic errors: Invalid STIX patterns, constraint violations

Exit Codes

  • 0: All files valid
  • 1: Validation errors found or file not found