Back to list
davydany

stix2-validator

by davydany

Awesome Cybersecurity Skills for Claude

2🍴 0📅 Jan 20, 2026

SKILL.md


name: stix2-validator description: 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.

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

OptionDescription
--strictEnable all optional validation checks
--enforce-refsWarn when object references don't resolve within the bundle
-r, --recursiveRecursively validate files in subdirectories
--jsonOutput results as JSON for programmatic use
-q, --quietSuppress 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

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon