cd /news/ai-agents/doc-foundry-adversarial-agents-that-… Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-169381] src=explainx.ai β†— pub= topic=ai-agents verified=true sentiment=↑ positive

DOC-foundry: Adversarial Agents That Prove Sigma Rules Before You Ship Them

DOC-foundry, a project by GitHub user mjha-arya, launched on Hacker News on November 13, 2026 with a pipeline that pairs LLM agents drafting Sigma detection rules against a deterministic engine that proves coverage and a fixed Red-Team adversary that must document two attacks in round one and re-throw them each round. Built on LangGraph, Pydantic, and FastMCP, the tool ingests threat strings such as CVE text, CISA KEV summaries, incident writeups, or ATT&CK techniques and outputs a Sigma rule, a threat report with convergence history, and a proof bundle with false-positive/false-negative counts and a hash. The repository had roughly two stars when explainx.ai cloned it, and its authors describe real-coverage as a bounded adversary set rather than an omniscient Blue Team.

by read8 min views1 publishedNov 14, 2026
DOC-foundry: Adversarial Agents That Prove Sigma Rules Before You Ship Them
Image: Explainx (auto-discovered)

DOC-foundry showed up on Hacker News on November 13, 2026 with a sharp pitch: models can draft Sigma rules, but they cannot hand you a proof that the rule works, an adversary that provably evades the weak version, and an honest record of how the rule hardened until it held. The GitHub repository ships two pipelines β€” one that proves coverage with a deterministic engine, and one that reviews like a SOC workflow β€” on top of LangGraph, Pydantic, and FastMCP.

If you build detection-as-code or automate purple-team work with coding agents, this project is worth a weekend install. It is early β€” roughly two stars when explainx.ai cloned it β€” but the architecture is unusually explicit about agents propose, engines prove, the same split security teams need as ARTEX-style offensive agents scale up parallel probing.

TL;DR #

Question Answer
What do you feed it? Any threat string: CVE text, CISA KEV summary, incident writeup, ATT&CK technique
What do you get? Sigma rule, threat report with convergence history, proof bundle with FP/FN and hash
Offline demo? python src/run.py --threat fixtures/certutil_t1105.json
Live authoring? python src/run.py "T1218.011 rundll32..." with Gemini or Claude keys
Review-only path? python src/run.py --chain "..." plus optionaluvicorn webui.server:app
Honest limit? real-coverage is a bounded adversary set, not omniscient Blue Team

Agents that act on your behalf need rules. See how explainx helps secure your agents β†’

Why detection engineers care now #

Sigma rules are portable YAML, but production quality still depends on telemetry shape, benign baselines, and evasion creativity. Teams already feel pressure from two directions:

  1. Offensive automation β€” LLM pentest orchestrators iterate exploits faster than humans can retune detections, a patternFBI FLASH messaging on ARTEX and Cloudflare's30Γ— traffic spike both describe.
  2. Generative drafting β€” models happily emit Sigma syntax thatlooks authoritative yet fails on rename tricks, shell obfuscation, or parent-process blind spots.

DOC-foundry's response is not another chat wrapper. It runs a self-repair loop where Blue re-authors after a brittle or broken verdict, while Red commits to two documented attacks in round one and re-throws them every round so goalposts do not drift mid-run.

Green and gray shields facing off, illustrating DOC-foundry Blue vs Red adversarial detection loop

That fixed-adversary discipline mirrors how explainx.ai treats benchmark claims elsewhere: bounded tests, explicit labels, no silent passes when the engine cannot evaluate a construct.

Architecture: propose vs prove #

The classic graph, documented in the README, looks like this in prose:

  1. Ingest β†’ extract β†’ telemetry β€” Threat Analyst normalizes input; Telemetry agent fixes the test set.
  2. Blue author β€” Detection Engineer drafts behavior plus command-line intent, not one brittle string match.
  3. Evaluate β†’ battery β†’ red_propose β†’ red_verify β†’ verdict β€” Deterministic referee scores FP/FN, runs mutation battery, and only counts Red bypasses the engine confirms.
  4. Repair or exit β€” If verdict is not real-coverage and rounds remain, Blue gets concrete evasions and false positives as evidence.
  5. Kartikeya gate β†’ bundle β€” Governance scores blast radius times capability delta; egress needs a human.

Four LLM personas live in src/agents.py: Threat Analyst, Blue Detection Engineer, Telemetry, and Red-Team Adversary. Everything that decides truth β€” matching, adversarial mutations, coverage labels β€” sits in engine.py, evaluator.py, and graph.py with same input β†’ same verdict β†’ same hash.

What the engine refuses to fake

The README's honesty contract matters for builders who have been burned by evaluators that silently ignore hard clauses. engine.py raises on constructs it cannot truly evaluate β€” CIDR filters, aggregations, invented |in operators β€” rather than scoring them as covered. An un-evaluable rule costs a broken round, and Blue gets the engine's error text as repair evidence.

That is the opposite of vibe-based "LGTM" reviews and closer to how serious teams treat schema validation and default deny on APIs.

Green probe pressing a crack in a shell, illustrating Red-team evasion testing against Sigma rules

The two pipelines: proof vs stakeholder review #

DOC-foundry runs two workflows with the same cast but different deliverables. Confusing them would mislead your SOC.

Classic proof loop (default for python src/run.py)

Outputs land in Outputs/<rule-slug>/ as:

  • rule.yml β€” Sigma artifact that survived adversarial rounds
  • report.md β€” Round-by-round convergence narrative
  • proof.json β€” Positive corpus, benign baseline, adversarial mutations, coverage label (real-coverage /brittle /broken ), FP/FN numbers, reproducibility hash

The canned certutil T1105 fixture demonstrates a honest two-round arc: round one is brittle after rename bypass; round two reaches real-coverage after Blue anchors on rename-resistant fields. That offline path is what CI should gate on.

Review chain (--chain and default Web UI)

The chain asks what would Red Team and SOC Lead say, then ships final-rule.yml, review-history.md, and review.json. The README states plainly: this path does not invoke the proof core, never executes telemetry, and issues no coverage verdict.

The Joomla iCagenda CVE-2026-48939 example is the doc to read first. Red Team pushes Blue to broaden against evasion; SOC Lead pushes back on noise and triage fields. The tension is the product: hardening for evasion raises alert volume.

Run the UI with:

pip install -r requirements.txt
python -m uvicorn webui.server:app --port 8000

FastAPI streams node events and token events over SSE. Cached replays are labeled REPLAY (cached) so demos cannot masquerade as live inference β€” a small integrity choice that matters when executives watch agent consoles.

Grounding: RAG without touching the hash #

src/knowledge_base.py plus rule_corpus/ provide offline BM25 retrieval:

  • Blue authors ground in SigmaHQ -style peer rules
  • Red attacks ground in MITRE ATT&CK defense evasion andLOLBAS

Retrieval grounds proposals only; it never enters the reproducibility hash. That separation keeps audits clean: creative text may drift; verdict math may not.

docs/OSS-PARTNERS.md maps future integrations β€” Atomic Red Team for positives, EVTX-ATTACK-SAMPLES for benign baselines, pySigma for multi-SIEM conversion. The SigmaRuleArtifact.backends slot already exists for backends you have not wired yet.

How to run it today #

From the repository root:

pip install -r requirements.txt

python src/run.py --threat fixtures/certutil_t1105.json

python src/run.py --evals

export ANTHROPIC_API_KEY=...
python src/run.py --claude "CVE-2026-45659 SharePoint deserialization RCE"

python src/run.py --corpus atomic

python src/run.py --approve alice

Governed deploy lives behind FastMCP in src/mcp_server.py: the graph cannot fetch arbitrary URLs or push YAML to production without a token bound to the bundle hash.

Kartikeya gate: blast radius as code #

src/governance.py implements Kartikeya's Gate as Blast Radius Γ— Capability Delta. Structural invariants include:

  • Egress always requires a human
  • Non-real coverage floors blast radius

That is philosophical naming, but the implementation detail matters for teams deploying agent harnesses next to SIEM credentials. Least privilege belongs in code, not prompt prayers β€” the same lesson as MCP hardening patterns and NIST, NSA, and CISA agent control practices on explainx.ai.

What people are asking #

Is this replacing my detection engineering team?

No. The README defines real-coverage as a validated first-version baseline with a fixed adversary, not forever bulletproof coverage. Your team still extends corpora, tunes for volume, and maps to Splunk, Elastic, or Sentinel via pySigma paths you own.

How does this compare to OpenAI's red-team factories?

OpenAI's Daybreak and cyber model work targets model robustness and exploit reasoning. DOC-foundry targets detection YAML against your telemetry category for one log source per run β€” a narrower, SOC-shaped problem. They can complement each other if you keep secrets off agent context windows.

Can Red "win" by refusing the adversary role?

Yes. Safety-tuned models sometimes decline. The UI records refusals, and graph.node_verdict refuses to award real-coverage when nobody attacked. "No evasions found" and "adversary never ran" must not look alike β€” another honesty seam worth copying in internal agent evals.

Why only one log source per run?

Majority vote picks a single telemetry category so Blue cannot overfit labels it never sees. A rule keyed on TargetFilename against process-creation events auto-fails β€” recall zero for the right reason.

Limits and licensing #

  • Early repo maturity β€” Few stars and three commits when indexed; treat APIs as volatile until releases exist.
  • License β€” ReadLICENSE andNOTICE.md in the repo before production use; explainx.ai does not render legal advice.
  • Keys and data β€” Live runs send threat text to Anthropic or Google APIs; run fixtures locally first.
  • SIEM deploy β€” Proof does not equal change management; pair with your existing detection-as-code pipeline, similar to practices in theAISOC self-host guide .

What this means if you ship agentic security tools #

DOC-foundry is a template for governed agent loops in security:

Pattern Why it matters
Deterministic referee Stops persuasive JSON from faking pass rates
Fixed Red corpus Makes convergence reachable and auditable
Separate review vs proof Stops "looks reviewed" from meaning "works"
Hash-bound deploy Ties human approval to an exact artifact
Labeled UI replay Keeps demos honest under executive scrutiny

If you are comparing offensive and defensive agent stacks, read it beside the OpenAI Codex Security CLI for code scanning and the November 2026 cyberattacks tracker for agentic pentest scale β€” offense and detection authoring are merging, but proof artifacts are still rare on the defensive side.

Repository details, dependency versions, and model names are accurate as of November 14, 2026 per the DOC-foundry README.

── more in #ai-agents 4 stories Β· sorted by recency
── more on @doc-foundry 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/doc-foundry-adversar…] indexed:0 read:8min 2026-11-14 Β· β€”