synthreat
Reproducible synthetic threat-intelligence datasets, in four languages — by Muhammed Shazin Sadhik Kunhi Parambath.
Labeled multilingual security-text corpora barely exist. synthreat generates
them on demand: threat-intel sentences in English, Russian, Chinese, and
German, each tagged with a risk label (CRITICAL / HIGH / MEDIUM /
LOW), named entities, and — optionally — ground-truth indicators of
compromise. Seed it and the output is byte-for-byte reproducible.
import synthreat
ds = synthreat.generate(samples_per_language=1000, seed=42, inject_iocs=0.3)
len(ds) # 4000
ds.stats() # {'by_language': {...}, 'by_label': {...}, 'with_iocs': ~1200}
ds.save("threats.jsonl")
Zero runtime dependencies — pure Python.
pip install synthreat
Why it's different
Most synthetic-data tools are generic (faker, mimesis) and know nothing
about security text. synthreat is purpose-built for threat intelligence, and
it's multilingual by construction — not English translated after the fact.
Because injected IOCs are known at generation time, every enriched sample
carries its indicators as ground truth, so the same dataset benchmarks both
a risk classifier and an IOC extractor.
Ground-truth IOCs
With inject_iocs, a fraction of samples get a synthetic IP / email / SHA-256 /
CVE embedded in the text and recorded on the sample:
ds = synthreat.generate(samples_per_language=10, seed=1, inject_iocs=1.0)
s = ds[0]
s.text # "...LEAKED... Contact admin@example.com; C2 at 192.0.2.77; sample 9f...; ref CVE-2021-4242."
s.iocs # {'ipv4': ['192.0.2.77'], 'email': ['admin@example.com'], 'sha256': ['9f...'], 'cve': ['CVE-2021-4242']}
Every value is synthetic and safe: IPs come from RFC 5737 documentation ranges and domains from RFC 2606 reserved names, so nothing resolves to a real host.
Pairs with osintlens
synthreat produces training/eval data in the exact shape osintlens consumes:
from synthreat import generate
from osintlens.ml import train
ds = generate(samples_per_language=2000, seed=0)
train(ds.as_training_data(), output_path="risk_model.joblib")
And with IOC injection you can measure extractor recall directly, comparing
osintlens.extract_iocs(sample.text) against sample.iocs.
Customize
from synthreat import ThreatDataGenerator
gen = ThreatDataGenerator(
seed=7,
languages=["en", "de"],
inject_iocs=0.5,
vocab_overrides={"ACTORS": {"en": ["MyActor"], "de": ["MeinAkteur"]}},
)
ds = gen.generate(
samples_per_language=500,
distribution={"CRITICAL": 0.25, "HIGH": 0.25, "MEDIUM": 0.25, "LOW": 0.25},
)
Command line
synthreat generate -n 5000 --seed 42 -o threats.jsonl
synthreat generate -n 100 --languages en ru --inject-iocs 0.4 --format json
cat <(synthreat generate -n 10 --seed 1) # prints JSON to stdout
Output schema
Each sample:
{
"text": "LEAKED: database dump - Fortune 500 company admin credentials exposed",
"label": "CRITICAL",
"language": "en",
"entities": [{"text": "LockBit", "type": "ORG"}, {"text": "Fortune 500 company", "type": "ORG"}],
"iocs": {}
}
A note on use
The data is fabricated for training, testing, and benchmarking. It is not real intelligence and should never be presented as genuine threat reporting.
Author
Created and maintained by Muhammed Shazin Sadhik Kunhi Parambath.
License
MIT
Metadata
Release files for synthreat 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 |
|---|---|---|---|---|
| synthreat-0.1.1.tar.gz | 14.1 kB | With provenance | Details for synthreat-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| synthreat-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for synthreat-0.1.1-py3-none-any.whl |
Total release size: 27.1 kB
Release files / synthreat-0.1.1.tar.gz
| Download URL | synthreat-0.1.1.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
289f6ae6908b44be8343afea4f60eddda47944d16ce78159086e11028c045e22
|
|
BLAKE2b-256 checksum How to use checksums |
fe51a3e3241d069b9b7e1cd8e3c6afcf06ac02a8f559547b9c369c6a0ded01a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 14, 2026.
Transparency logRelease files / synthreat-0.1.1-py3-none-any.whl
| Download URL | synthreat-0.1.1-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd7bba142a7a265f67a6e3fa4274c0861a6a353d5b6fe021dc8e079c6bd8147c
|
|
BLAKE2b-256 checksum How to use checksums |
5191313f0a94a1f95a3ca0519a3e55ebc9d8236a34cac5c04fc9e7fa176167f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 14, 2026.
Transparency logSecurity for synthreat 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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for synthreat-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 Jul 14, 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.