implementing-security-information-sharing-with-stix2

Create, validate, and publish STIX 2.1 threat intelligence bundles via TAXII 2.1 servers.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill implementing-security-information-sharing-with-stix2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementing-security-information-sharing-with-stix2
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/threat-intelligence/implementing-security-information-sharing-with-stix2
Command: npx skills add https://github.com/xalgord/xalgorix --skill implementing-security-information-sharing-with-stix2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires stix2, taxii2-client, requests.

What problem does it solve?

Sharing threat intelligence between organizations requires a standardized, machine-readable format, and hand-building STIX 2.1 objects often produces invalid bundles with dangling relationships, malformed patterns, or missing required properties that break downstream consumers.

Core Features & Use Cases

  • STIX 2.1 Object Creation: Build Indicators, Malware, Threat Actors, Campaigns, Attack Patterns, and Identities with the stix2 Python library, including STIX patterning for hashes, domains, processes, and email subjects.
  • Relationship Graphing & Bundling: Link objects with Relationship SROs (uses, indicates, attributed-to) and serialize everything into a validated STIX Bundle.
  • TAXII 2.1 Publishing & Consumption: Push bundles to writable TAXII collections and pull filtered intelligence from feeds using taxii2-client.
  • Use Case: A threat intel team documenting an Emotet campaign can create the malware, actor, and indicator objects, link them with relationships, validate the bundle, and publish it to their ISAC's TAXII server for SIEM/SOAR ingestion.

Quick Start

Use this skill to build a STIX 2.1 bundle with an indicator, malware, and threat actor for a phishing campaign, validate it, and publish it to my TAXII server.

Frequently Asked Questions about implementing-security-information-sharing-with-stix2

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create STIX 2.1 indicators in Python?

Use the stix2 library's Indicator class with a pattern_type of stix and a STIX pattern such as [domain-name:value = 'example.com']. Always construct objects through the library rather than raw dicts so required properties like type, id, created, and modified are generated automatically.

How to publish STIX bundles to a TAXII 2.1 server?

POST the serialized bundle to the collection's objects endpoint with Content-Type and Accept headers set to application/taxii+json;version=2.1. Check the response status resource and confirm success_count matches the number of objects sent.

Does the stix2 library validate STIX 2.1 objects automatically?

The stix2 library enforces required properties and spec constraints at construction time, raising InvalidValueError or MissingPropertiesError. For full bundle linting, re-parse serialized output with allow_custom=False or run the stix2-validator CLI tool.

Why does my STIX bundle break consumers even though it parses?

Dangling relationship references are the usual cause: a Relationship whose source_ref or target_ref points to an object not included in the bundle parses fine but fails in consumers. Verify every SRO endpoint resolves to an SDO or SCO id present in the bundle.

When should I not use STIX 2.1 for threat sharing?

STIX 2.1 is overkill for simple IP blocklists or CSV-based IOC feeds that carry no relationship context. Plain-text feeds or simpler formats like CSV or OpenIOC are more efficient when you do not need to link indicators to malware, actors, and campaigns.