bastioncorpus
The shared prompt-injection corpus for the bastion trilogy. One canonical, versioned dataset — attack strings, false-positive traps, taxonomy — that all three tools pull from instead of each rolling its own.
| tool | role | reads bastioncorpus as |
|---|---|---|
| agentbastion | prevent | block these strings (SemanticDetector templates + benchmark corpus) |
| bastionprobe | attack | fire these payloads |
| bastiontrace | investigate | match these signatures in a trace |
Same taxonomy, three directions. No LLM, no cloud, no dependencies — pure data plus a loader and three format adapters.
Install
pip install bastioncorpus
Use
Inspect:
bastioncorpus stats
bastioncorpus list --category indirect_injection
bastioncorpus validate
Export into each tool's native file:
bastioncorpus export --format probe --out payloads.jsonl # bastionprobe loads this
bastioncorpus export --format trace --out signatures.jsonl # bastiontrace matches these
bastioncorpus export --format semantic --out corpus.jsonl --templates templates.jsonl # agentbastion
From Python:
from bastioncorpus import load_corpus, to_probe, to_semantic, to_trace
rows = load_corpus()
payloads = to_probe(rows) # fireable attack payloads
semantic = to_semantic(rows) # {"templates": [...], "corpus": [...]}
signatures = to_trace(rows) # canary-stripped substring signatures
Schema
One row per attack (or benign trap). text may carry a single {canary}
placeholder the attack runner fills per run; defense and forensics adapters
strip it.
| field | meaning |
|---|---|
id |
stable unique id |
text |
the string (optional {canary} slot) |
category |
canonical class: direct_injection, indirect_injection, instruction_override, jailbreak_persona, exfiltration, delimiter_injection, obfuscation, or benign_* |
label |
malicious | benign (benign = false-positive trap, to measure over-blocking) |
lang |
language code (en, it, de, …) — never baked into category |
tactic |
framing tactic (authority, data-field, egress-legit, …) |
channel |
where planted (tool_output, user_input) |
check |
how a hit is scored (canary, tool, none) |
forbidden_tool |
tool a check=tool payload tries to trigger |
severity |
0–5 |
intent |
plain-language restatement, for semantic templates |
Direct/user_input rows are defense and forensics material; only
tool_output payloads with a scoring check are fired as attacks.
Why
Before this, each tool hand-maintained overlapping payload lists that drifted apart. bastioncorpus makes one of them authoritative: fix a payload here, every tool in the trilogy gets it on the next export.
License
MIT
Metadata
Release files for bastioncorpus 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bastioncorpus-0.2.0.tar.gz | 16.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bastioncorpus-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.7 kB
Release files / bastioncorpus-0.2.0.tar.gz
| Download URL | bastioncorpus-0.2.0.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89705b3c9d2096b84ee5851585d7cd3c88096d9c6e347cb23b821f90a38688c8
|
|
BLAKE2b-256 checksum How to use checksums |
eaef69b81b6a16689e7a826fa9164608a2c05eaeb01c98bf95ca0ea64ea45438
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 11, 2026.
Transparency logRelease files / bastioncorpus-0.2.0-py3-none-any.whl
| Download URL | bastioncorpus-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39a0f3ce9c4ff21d782935ad2b87d8948cdd4c07823b9411deec0a9d0c442fc7
|
|
BLAKE2b-256 checksum How to use checksums |
1803b6bfa7d0a9b8c1f1254f55b6a1e5162ffae26e53b6d22ebe764bbfb11114
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 11, 2026.
Transparency log