Open-source Threat Intelligence to Detection-as-Code engine. ti2dac turns threat reports and incident write-ups into evidence-checked Sigma rules, native queries for Splunk, Elastic, Sentinel, Defender, CrowdStrike, QRadar, OpenSearch, Loki and Wazuh, and safe simulation and test guides, so blue teams can go from a report to a reviewed detection package in minutes.
sigma · detection-as-code · threat-intelligence · mitre-attack · siem · splunk · elastic · microsoft-sentinel · wazuh · blue-team · detection-engineering · llm
ti2dac: Threat Intelligence → Detection-as-Code
Current release: 0.1.1
ti2dac turns a threat-intelligence report or an internal incident report into a reviewed, tested detection package:
- the attacker behaviours (TTPs) in the report, with evidence quotes checked against the source and verified MITRE ATT&CK mappings
- one vendor-neutral Sigma rule per behaviour (single-event or threshold/correlation), validated with pySigma
- the same rule as native queries for Splunk, Elastic, Microsoft Sentinel, Defender XDR, CrowdStrike NG-SIEM, QRadar, OpenSearch and Grafana Loki, with a per-SIEM field-mapping table
- a simulation and test guide per rule: a safe lab script and its cleanup, the matching Atomic Red Team test, expected events, and positive and false-positive test procedures
- unit tests for each rule, plus local replay of real lab or incident logs, so you know a rule fires before it reaches a SIEM
- ADS triage documentation, telemetry requirements, a validation matrix and an ATT&CK Navigator layer
- a feedback and review workflow: error taxonomy, versioned corrections, lessons fed back into the AI, four-eyes approval and an audit log
The AI does the reading and the detection writing. Everything that can be deterministic is deterministic: conversion, validation, documentation, safety checks and redaction. This keeps token use low and the output reproducible.
Steps 1 to 9 run automatically. Steps 10 to 12 are done by people: ti2dac never runs the simulation scripts and never connects to your SIEM.
Install
Requires Python 3.10 or newer. CI tests Python 3.10, 3.12 and 3.14.
pip install ti2dac # or: pipx install ti2dac
pip install "ti2dac[gemini]" # optional: Google Gemini as the AI provider
pip install "ti2dac[evtx]" # optional: replay Windows .evtx evidence
Quick start
From a source checkout (git clone https://github.com/Sazidul0/TI2DaC && cd TI2DaC):
uv venv .venv && uv pip install --python .venv/bin/python -e ".[dev]"
cp .env.example .env # then add ANTHROPIC_API_KEY (see docs/getting-started.md)
cp ti2dac.example.yaml ti2dac.yaml # then set your domains, customer names, telemetry
ti2dac run path/to/report.html # public threat-intel report (file or URL)
ti2dac run IR-2026-0147.docx --incident --events host-sysmon.evtx # internal incident report + its evidence logs
ti2dac serve # web UI on http://127.0.0.1:8000
The two-step flow lets an analyst choose behaviours before any rule-generation tokens are spent:
ti2dac analyze report.html # 1 AI call: behaviours ranked as B1..Bn
ti2dac generate <run-id> --select B2,B5 # 1 AI call per chosen behaviour
Without AI (--no-ai or TI2DAC_NO_AI=1), the deterministic parts still work: ingestion, IOC extraction,
cited ATT&CK IDs, and validation, conversion, unit tests and replay of hand-written rules.
Web UI
ti2dac serve starts a local web UI (bound to 127.0.0.1) for analysts and reviewers, with logins and roles.
The Runs page: upload a report or paste a URL, choose the document type, and follow recent jobs and totals.
A run: behaviours extracted from the report, ranked, with checked evidence quotes and ATT&CK mappings. Tick any behaviour without a rule to generate more.
Safety at a glance
- Your data stays home. The AI sees only trimmed, redacted text. Names, hosts, internal IPs, emails and secrets are replaced with placeholders first. TLP:RED documents never go to an AI.
- Nothing is executed. Simulation scripts are linted for destructive or credential-stealing actions, and the tool never runs them. Nothing the model writes is run.
- Nothing is trusted unchecked. Evidence quotes, ATT&CK IDs, Sigma syntax and rule self-tests are verified by code before you see a rule.
- People stay in charge. The tool drafts. A second person (the approver) must approve what the author created, and only approved rules are exported.
Generated rules are drafts until you have tested them on real events. See known limitations.
Documentation
| Guide | What is in it |
|---|---|
| Getting started | AI provider setup, a step-by-step walk-through, supported inputs |
| How it works | Architecture in plain terms, the working process, how tokens are kept low |
| Quality, safety and testing | Safety controls and the three levels of proving a rule works |
| SIEM coverage | The 14 targets, Wazuh, correlations and client profiles |
| Review and configuration | Feedback, four-eyes approval, Git hand-off, ti2dac.yaml |
| Operations | Monitoring, web UI security, output package layout |
| CLI reference | Every command |
| Known limitations | What the tool does not do yet |
Development
.venv/bin/python -m pytest -q # 254 tests, no network or API key needed
Dependency pins that matter: pySigma must stay 0.11.x, because the QRadar backend breaks on 2.x and newer
SQLite-backend releases silently pull in pySigma 2. pyparsing must stay below 3.2, which pySigma 0.11's condition
parser needs. pySigma-backend-sqlite must be 0.2.0. regex and dateparser are pinned together (see pyproject.toml).
License
MIT. See LICENSE.
Metadata
Release files for ti2dac 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ti2dac-0.1.1.tar.gz | 298.1 kB | With provenance | Details for ti2dac-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ti2dac-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for ti2dac-0.1.1-py3-none-any.whl |
Total release size: 561.1 kB
Release files / ti2dac-0.1.1.tar.gz
| Download URL | ti2dac-0.1.1.tar.gz |
|---|---|
| Size | 298.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a973bb2a1d6469aae9b88ae47585f563b78ad4b18634c92350bd4566c4444bfd
|
|
BLAKE2b-256 checksum How to use checksums |
2447376f478a9212d6923fe7b6eaaecd7c682cdef2626ec4845c880cb4f98473
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / ti2dac-0.1.1-py3-none-any.whl
| Download URL | ti2dac-0.1.1-py3-none-any.whl |
|---|---|
| Size | 262.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
583f0e3da6b8963ec8e8b5fcd09318338d628a468a891d25a6535c5e34069d87
|
|
BLAKE2b-256 checksum How to use checksums |
58fa0deeda27c55bb1ee1281868e03a32bac382b1d2018978fe9b812ff34266b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for ti2dac 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ti2dac-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.