
GAUNTLEX
io.github.sanjoy1234由 GitHub 帳號 sanjoy1234 發布v1.0.2更新於 Oct 24, 2026
Concurrent Builder + Breaker agents generate code and adversarial tests at once, gated in CI.
概覽
GAUNTLEX 針對同一份規格同時執行 Builder 與 Breaker 兩個代理,一併產出程式碼、對抗性測試與對抗韌性評分。
- 可以做什麼
- 針對規格、本機檔案或 GitHub issue 執行 Builder + Breaker 對抗評估,可附加業務意圖並選擇合規領域(OWASP、HIPAA、FINRA、SOC 2、PCI DSS)。查看執行狀態並讀取最近一次執行的弱點發現。驗證報告完整性,以 HTML、SARIF、JUnit 或 JSON 格式輸出報告,並依合規控制項稽核報告。比較兩次執行、檢視評分趨勢與成本指標,瀏覽已保存的攻擊紀錄。將工具接入 IDE 與 CI 設定,並作為本機 MCP 伺服器供編碼助理呼叫。
- 適用情境
- 適合需要在程式碼產生階段而非提交之後進行安全測試的情況,也適合希望在 CI 加入具評分、可防竄改的關卡,或以受監管產業劇本引導攻擊的團隊。同樣適合想從 Claude Code、Cursor、Windsurf、Copilot、Codex 或 Zed 觸發並輪詢執行的使用者。
- 執行需求
- 本機需 Python 3.11+,支援 macOS、Linux 或 Windows(Windows 建議 WSL2)。透過 pip 或 uvx 從 gauntlex-ai 套件安裝。需要一個模型供應商:本機 Ollama、OpenRouter 免費額度,或 Anthropic/OpenAI API 金鑰。setup 會把供應商與憑證寫入 .env 檔案;環境中若有 Jira、Confluence 或 Aha! 憑證會被偵測用於業務意圖輸入。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 GAUNTLEX,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
⚔️ GAUNTLEX
Adversarial Co-Generation Engine
Generates code and adversarial attacks from the same specification, at the same time — before a commit exists.
[Tests] [Python] [PyPI] [License: MIT] [OS]
What it is · See it run · Quickstart · Commands · Domains · IDE Integrations · Deep Dive
What it is
Every AI coding tool ships code and hopes someone tests it for security later. GAUNTLEX removes the "later." It runs two agents concurrently against the same specification:
- Builder — generates the implementation
- Breaker — generates adversarial attacks against the same spec, at the same instant
An Arbiter scores every attack (mitigated / partial / missed) and produces an Adversarial Resilience Score (ARS). A configurable gate blocks your CI pipeline when the score falls below threshold — the same way a failing test suite blocks a merge.
No manual test authoring. No separate security review step. No waiting for a scanner to catch up to code that shipped last week.
See it run
📊 One-page overview — what it is, what's different, how it deploys. Built for sharing with a technical lead or architecture review board.
[GAUNTLEX overview — slide 1] [GAUNTLEX overview — slide 2]Watch the Demo Setup through the CI gate, real terminal output, real dashboard — concurrent Builder + Breaker, HIPAA domain testing, and every IDE integration in one pass.
Why it's structurally different
Three properties, not features — the reasoning behind each is in the Deep Dive:
- Concurrent, not sequential. Builder and Breaker fire at the same instant via
asyncio.gather(). The Breaker never sees generated code — it reasons from the specification alone, the same surface a real attacker would work from before your implementation choices exist. - A native MCP integration, both directions. GAUNTLEX exposes itself as an MCP server so Claude Code, Cursor, Windsurf, or Zed can trigger and poll runs directly from your coding tool — and it consumes external MCP servers (plus built-in CISA KEV / NIST NVD feeds) to enrich every run with live threat data. See the Domain Intelligence page for exactly what's live vs. static.
- Regulatory domains as first-class input. FINRA, HIPAA, PCI DSS, SOC 2, and OWASP Top 10 playbooks steer the Breaker toward the scenarios that actually matter for a regulated codebase — not a generic scan re-labeled per industry.
Where GAUNTLEX fits vs. other security testing
Not a replacement for any of these — a different point in the lifecycle. Static analysis and pentests are still worth doing; GAUNTLEX exists because neither of them runs while the code is being generated.
Quickstart
Install first with pip install gauntlex-ai, or skip the install entirely with uvx --from gauntlex-ai gauntlex setup.
gauntlex setup writes your model provider and credentials to .env for
you — there is no manual configuration step, and no fallback to whatever API
key happens to be lying around the environment. What you configure during
setup is what runs, always (run gauntlex init separately if you also want
a .gauntlex.yml with tunable defaults like rounds_max or the gate
threshold).
Wall-clock time depends on which model you configure — anywhere from single-digit
seconds with a fast paid API to several minutes with a free-tier or local model.
Attack count targets 5/20/50 by mode (quick/standard/thorough), spread
across the adversarial rounds — actual totals land close to but not always
exactly at the target (a thorough run might fire ~30–50, for example),
since it depends on how many attacks the model actually returns per round.
Run against a GitHub issue directly
Add business intent — attack surface = spec + why it's needed
--issue is the spec — precise enough for the Builder and Breaker to implement and attack. It answers what to build. --intent adds a second, separate input answering why it's needed, pulled from wherever your team actually tracks that: a Jira key, a Confluence page, or an Aha! roadmap item. GAUNTLEX reasons from both together, not just the spec alone.
gauntlex setup connects Jira/Confluence/Aha! automatically if it detects credentials in your environment — see the interactive wizard's business intent step.
Requirements
- Python 3.11+
- macOS, Linux, or Windows (WSL2 recommended on Windows)
- One model provider: Ollama (free, local), OpenRouter free tier, or an Anthropic/OpenAI API key
CLI reference
All 22 commands, grouped by when you'd reach for them:
Full usage, flags, and examples for every command: Deep Dive → Complete CLI Reference.
Language support
Auto-detected from the specification — no per-project configuration:
Compliance & domain coverage
5 regulated-industry playbooks ship today — 43 attack scenarios total, each mapped to a specific rule or control, not a generic label:
Two more (owasp_api_security, nist_ssdf) are available via gauntlex policy install. GDPR, FedRAMP, and DORA are on the roadmap
— not available today.
For exactly what's live threat data vs. static playbook content, and how to bring your own domain, see the full Domain Intelligence page.
IDE & agent integrations
One command wires GAUNTLEX into whatever AI coding tool you already have open:
Each target gets the right file, format, and schema for that specific tool — this command handles the differences so you don't have to — and it merges into any config you already have rather than overwriting it, so other MCP servers you've already configured survive.
Claude Code users can also install via the plugin marketplace instead of
integrate:
This registers the MCP server and all /gauntlex:* skills (run, verify,
doctor, compare, report, learn, validate) in one step, updated via
/plugin update. Requires gauntlex on PATH (pip install gauntlex-ai).
Zero-config: this repo ships an AGENTS.md that Codex, Cursor, Cline, Windsurf, and Gemini CLI read automatically with no install step at all — copy the pattern into your own repo if you're building on top of GAUNTLEX rather than just using it.
Exact file paths per platform, the merge-safety guarantees, and the MCP
tools GAUNTLEX exposes (gauntlex_run, gauntlex_status, gauntlex_verify,
and more): Integrations guide.
Enterprise deployment
gauntlex dashboard— ARS trend, gate status, and attack-outcome breakdown across every connected repository. One URL for the team.gauntlex serve --rbac— GitHub team-based access control (admin / reviewer / developer) across a shared instance.gauntlex audit— every run listed with NIST SSDF / OWASP SAMM / SOC 2 control mapping, for a configurable window.- Air-gapped operation — the full engine runs on local Ollama with zero outbound calls, for environments that can't reach the internet.
Full detail on each: Deep Dive → Enterprise Features.
Key terms
- Adversarial Resilience Score (ARS) — the mean of per-attack scores (mitigated=1.0, partial=0.5, missed=0.0) across every attack fired at a run. Range [0.0, 1.0]. The core metric GAUNTLEX produces.
- Builder — the agent that generates code from the specification.
- Breaker — the agent that generates adversarial attacks from the same specification, at the same instant, without seeing the Builder's output.
- Concurrent co-generation — Builder and Breaker running via
asyncio.gather()against the same spec at the same time, instead of testing after code is written. - Resilience Report — the tamper-evident output of a GAUNTLEX run, including a SHA-256 hash over the ordered attack results, independently verifiable via
gauntlex verify. - Gate — the CI check that blocks a merge when a run's ARS falls below the configured threshold (default 0.80).
FAQ
How do I test AI-generated code for security vulnerabilities?
Point GAUNTLEX at the same specification your AI coding tool used: gauntlex run --issue your_spec.md --mode quick. It fires adversarial attacks derived from that spec and returns an Adversarial Resilience Score in under a minute.
What is an Adversarial Resilience Score (ARS)? The mean of per-attack scores (mitigated = 1.0, partial = 0.5, missed = 0.0) across every attack fired at a run — a continuous [0.0, 1.0] measure of how well the generated code holds up, not a simple pass/fail count. Full formula and reasoning: the ARS explainer.
Does GAUNTLEX test code before or after it's generated? At the same instant. The Breaker agent reasons from the specification directly, concurrently with the Builder — it never waits for code to exist first, which is what "concurrent, not sequential" means in practice.
Which compliance frameworks does GAUNTLEX support? OWASP Top 10, HIPAA, FINRA, PCI DSS, and SOC 2 out of the box, with NIST SSDF and OWASP API Security available as installable extensions. See Domain Intelligence for exactly what's covered per domain.
Can GAUNTLEX run without sending code to an external API? Yes — the full engine runs on local Ollama with zero outbound calls, for air-gapped or compliance-restricted environments.
More questions, including gating thresholds and contributing a new policy domain: full FAQ in the Deep Dive.
Learn more
- Deep Dive — the full story: why concurrent execution matters, how GAUNTLEX compares to SAST/DAST/pentest, the complete CLI and configuration reference, architecture, FAQ, and roadmap.
- Domain Intelligence — exactly what's covered per regulated domain, what's live vs. static, and how to extend it.
- Contributing — how to add a policy domain, a language profile, or a feature.
Where to find GAUNTLEX
Package & registries
- PyPI —
pip install gauntlex-ai - Official MCP Registry — listed as
io.github.sanjoy1234/gauntlex
Writing
- GAUNTLEX runs GAUNTLEX — a signed, verifiable self-report, plus a head-to-head measurement of concurrent vs. sequential adversarial testing on one real spec
- dev.to — "Why I Built an Adversarial Co-Generation Engine"
- dev.to — "The Adversarial Resilience Score: A New Metric for AI-Generated Code"
- dev.to — "How GAUNTLEX Gates HIPAA/FINRA Compliance in CI"
- dev.to — "The Login Endpoint That Handed Out Tokens Nobody Ever Checked"
- LinkedIn Article — "The Math That Breaks When AI Writes a Million Lines of Code"
Community
- GitHub Discussions — questions, feedback, and "I built X with this" show-and-tell
Acknowledgments
- Deven Samant — early feedback and validation
MIT License · Built by Sanjoy Ghosh
來源:README.md,提交 0bdae27
工具
0版本歷史
1- v1.0.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分