Aiglare

io.github.nugehs由 GitHub 帳號 nugehs 發布v0.2.3更新於 Oct 24, 2026

Audit AI/LLM features for governance guardrails: confidence, fallback, validation, human-in-loop.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

Aiglare 對 JS/TS 儲存庫做靜態稽核,找出缺少治理護欄的 AI/LLM 呼叫面,並向助理提供稽核、CI 閘門與供應商清單工具。

可以做什麼
對儲存庫執行完整的 AI 呼叫面稽核,可依 sink 類型或嚴重程度篩選,並視需求回傳含合規違規項的結構化 JSON 報告。取得儲存庫的 CI 閘門結論,包括是否通過以及阻擋性的紅色副作用面數量。列出掃描器可辨識的推論供應商與 SDK。結果依 sink(面向使用者、有副作用、內部)分類每個 AI 呼叫面,並就五項護欄面向評分。
適用情境
適合檢視 JS/TS 程式庫中會觸及使用者或觸發付款、預訂、寄信、資料庫寫入等不可逆動作,卻缺少信心度處理、備援、驗證或人工審核的 AI 功能。也適合為 SOC 2、EU AI Act、NIST AI RMF 或 OWASP LLM Top 10 準備合規佐證。
執行需求
透過 npx 從 npm 套件 @nugehs/aiglare 以 stdio 在本機執行,需要 Node.js 以及取得該套件的網路存取。僅支援桌面 MCP 主機。未宣告驗證、環境變數或標頭。選用的 repoctx 索引可提升準確度。
安裝前請注意
僅為靜態、建議性分析:會有誤報與漏報,應把結果視為待檢視的呼叫面,而非已確認的違規。它會讀取本機儲存庫原始碼。CI 閘門在紅色副作用面上以非零碼結束,接上後可能導致建置失敗。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Aiglare,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

aiglare

Lint your AI features for governance guardrails — where can the model do something you can't undo?

[npm] [CI] [license: MIT] [node]

Live site: nugehs.github.io/aiglare-web

[aiglare demo]

Point it at any JS/TS repo and it finds every place an LLM/AI output reaches a user or triggers a side-effect (payment, booking, email, database write) — then flags which of those have no confidence handling, no fallback, no output validation, and no human-in-the-loop.

Most AI incidents aren't model failures. They're governance failures: the model output flowed straight to a user or an irreversible action with nothing in between. This tool makes those paths visible, and lets you block them in CI.

npx @nugehs/aiglare                                        # audit current reponpx @nugehs/aiglare ./src --ci                             # fail the build on a red side-effectful surfacenpx @nugehs/aiglare --compliance all --format html         # HTML evidence report for auditorsnpx @nugehs/aiglare --compliance soc2,eu-ai-act --format lint --ci  # compliance linter in CI

What it reports

Each AI surface is classified by sink — where the output goes:

  • user-facing — returned from a route/controller, or rendered in a component
  • side-effectful — feeds a payment, booking, email, db/file write, or shell
  • internal — logged or cached only

…and scored on five guardrail dimensions: confidence handling, fallback/uncertain path, output validation, human-in-the-loop (for side-effects), and error isolation.

SeverityMeaning
🔴 redmodel output hits a user or a side-effect with no guardrails — review now
🟡 amberpartial coverage
🟢 greenguardrails present

The CI gate (--ci) fails only on red + side-effectful surfaces — the "AI auto-triggers an irreversible action with no confirmation" case — so it's safe to adopt without drowning a team in warnings.

Compliance reports

Pass --compliance to map every finding to specific regulatory controls, then pick your output format:

bash
# HTML evidence report — branded, collapsible per-framework sections, guardrail matrixaiglare --compliance all --format html > report.html
# ESLint-style linter — pipe into CI, editors, or reviewersaiglare --compliance soc2,eu-ai-act --format lint
# Markdown evidence doc — ready to hand to an auditoraiglare --compliance all --format markdown > AUDIT.md
# Guardrail linter (no framework) — rule IDs like guardrail/human-in-loopaiglare --format lint

Supported frameworks:

FrameworkControls mapped
soc2SOC 2 Trust Services Criteria — CC7.2, CC7.4, CC9.1, A1.2, PI1.2, PI1.3
eu-ai-actEU AI Act — Art. 9, 13, 14, 17
nistNIST AI RMF — GOVERN-1.2, MAP-2.3, MEASURE-2.5/2.6, MANAGE-1.3/2.2
owaspOWASP LLM Top 10 — LLM02, LLM04, LLM08, LLM09

Use all to include every framework. Each surface in --json output gains a violations[] array with the framework, control ID, description, and error/warning level.

Multi-repo: pass multiple paths for a single combined report:

bash
aiglare ./api ./web --compliance all --format html > report.html

Provider-agnostic

Detection is driven by a provider registry covering OpenAI, Anthropic, Google, Cohere, Mistral, Replicate, the Vercel AI SDK, LangChain/LangGraph, Ollama, AWS Bedrock, Cloudflare Workers AI, and Hugging Face — plus raw fetch/axios calls to known inference hosts. Adding a provider is a one-line PR.

Optional: repoctx acceleration

If a repoctx index (.dev-context/index.json) is present, the tool uses it automatically to prioritize likely AI files and sharpen sink classification via repoctx's kind/domain data (e.g. a file repoctx marks as a controller route is correctly treated as user-facing even when the native scanner can't see the call graph). Without it, a built-in TypeScript-compiler scanner does the same job at lower fidelity. Same tool, two fidelity levels — standalone for everyone, richer for repoctx users.

MCP server

aiglare ships a built-in Model Context Protocol server so agents can run audits directly:

bash
aiglare mcp        # stdio JSON-RPC server (no SDK dependency)

It exposes three tools:

ToolWhat it does
ai_surface_auditFull audit of a repo (path, optional sinks, severity) → the same structured report as --json
ai_surface_gateCI-gate verdict for a repo: passed + count of blocking red side-effectful surfaces
list_providersThe provider registry the scanner detects

Register it with an MCP host (Claude Desktop, Cursor, VS Code, …):

json
{  "mcpServers": {    "aiglare": {      "command": "npx",      "args": ["-y", "@nugehs/aiglare", "mcp"]    }  }}

aiglare vs alternatives

ApproachWhat it doesWhere aiglare differs
guardrails-ai / NeMo Guardrails / runtime validatorsValidate or correct each model output at runtime, per callaiglare is static analysis: it finds the AI surfaces that have no guardrail at all, before anything runs — then you add a runtime validator there
semgrep / custom lint rulesGeneral-purpose static rules you write and maintain yourselfaiglare ships the AI-specific knowledge out of the box: a provider registry, sink classification, and five guardrail dimensions — zero rule-writing
Manual AI-feature reviewCatches nuance a scanner cannotaiglare gives reviewers the complete inventory of AI surfaces and a severity triage, so review time goes where the risk is

These are complementary: aiglare tells you where a guardrail is missing; runtime validators are how you add one.

Run a 1-week pilot

Want to evaluate aiglare on a real codebase before adopting the CI gate? PILOT.md is a step-by-step one-week runbook: install, first audit on a backend and a frontend repo, reading the report, tuning --severity/--sinks, and deciding whether to turn on --ci.

Honest limitations

This is static, advisory analysis — a linter, not a verifier. It produces false positives (a guardrail two call-hops away can be missed) and false negatives (a confidence variable that doesn't actually gate anything reads as present). Treat output as surfaces to review, not violations. The single-file native scanner cannot follow the call graph; the repoctx adapter exists precisely to close that gap.

Options

aiglare [path...] [options]  --compliance <fw>   Map findings to compliance controls.                      Comma-separated: soc2, eu-ai-act, nist, owasp, or "all"  --format <fmt>      Output format: terminal (default), json, lint, markdown, html  --json              JSON output (alias for --format json)  --ci                Exit non-zero on a red side-effectful surface  --severity <lvl>    Show only red, or amber-and-worse  --sinks <list>      Filter: user-facing,side-effectful,internal
aiglare mcp           Start the MCP server (stdio)

The MCP tool ai_surface_audit accepts an optional compliance array — each surface in the response includes a violations[] array when set.

License

MIT


Part of the toolchain

aiglare is one of four tools that form a deterministic trust layer for AI-assisted development. Each answers a question people keep handing to an LLM — with static analysis instead.

  • repoctx — context: what does this change actually touch?
  • tieline — contracts: did the front end and back end quietly stop agreeing?
  • bouncer — compliance: could you defend this to Ofcom?
  • aiglare (this tool) — governance: where can the model do something you can't undo?

More at segunolumbe.com. static analysis, never the model.

來源:README.md,提交 7fd3ccb

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分