AgentGuard — security checks for AI agents

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

Secret, CVE and dependency-vulnerability scanning for AI agents (free, OSV.dev).

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

概覽

AI 產生的概覽

讓助理掃描文字與程式碼中的硬編碼密鑰,並檢查套件或相依性檔案是否有已知 CVE。

可以做什麼
AgentGuard 提供三個工具。scan_secrets 會在文字、程式碼或 diff 中標記硬編碼密鑰,例如 API 金鑰、權杖與私密金鑰,完全在本機執行且只回傳遮蔽後的預覽。check_cve 會回報某個特定套件版本是否有已知 CVE,並附上嚴重程度與修正版本。scan_dependencies 會讀取 go.mod、package.json 或 requirements.txt,列出有漏洞的固定相依套件,每次呼叫上限 200 個。
適用情境
適合在助理撰寫、審查或提交程式碼時,在內容被記錄或送出前做一次快速的密鑰檢查;也適合在不離開助理的情況下,了解某個固定相依套件版本是否有已知漏洞。
執行需求
以本機 stdio 程序在使用者機器上執行,僅支援桌面端。可透過 Docker 映像、Go 安裝或預先建置的執行檔安裝。未宣告需要 API 金鑰、帳號或環境變數。check_cve 與 scan_dependencies 需要連線至公開 OSV.dev API 的網路存取;scan_secrets 完全離線運作。
安裝前請注意
scan_secrets 會讀取你提供的文字、程式碼或 diff,但只回傳遮蔽後的預覽而非原始值。check_cve 與 scan_dependencies 會將套件名稱與版本傳送給第三方 OSV.dev API。此伺服器為唯讀,不會修改檔案,但掃描前仍應確認傳入的內容。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 AgentGuard — security checks for AI agents,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

其他 MCP 客戶端

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

README

AgentGuard — security checks for AI agents (MCP server)

A free, open-source, single-binary MCP server that gives any AI agent (Claude Desktop, Cursor, Claude Code, …) security checks in the loop:

ToolWhat it doesData source
scan_secretsFlags hard-coded secrets (API keys, tokens, private keys) in text/code/diffs before the agent commits, logs, or sends them. Runs locally; values are masked.local (regex + entropy)
check_cveWhether a specific package version has known CVEs, with severity + fixed version.OSV.dev (free)
scan_dependenciesScans a go.mod / package.json / requirements.txt and reports every vulnerable pinned dependency.OSV.dev (free)

No API key, no account, no telemetry. Everything runs locally except CVE lookups, which hit the free public OSV.dev API.

Install

Pick whichever fits your setup. All three give the same stdio MCP server.

Docker (no Go toolchain needed)

sh
docker run -i --rm ghcr.io/shuaicongxiaomai/agentguard:latest demo

MCP client config (mcpServers block in Claude Desktop / Cursor / Claude Code):

jsonc
{  "mcpServers": {    "agentguard": {      "command": "docker",      "args": ["run", "-i", "--rm", "ghcr.io/shuaicongxiaomai/agentguard:latest"]    }  }}

Go install

sh
go install github.com/shuaicongxiaomai/agentguard@latest
jsonc
{ "mcpServers": { "agentguard": { "command": "agentguard" } } }

Prebuilt binary

Download the archive for your OS/arch from the Releases page, extract it, and point the config command at the absolute path to the binary.

Build from source

sh
go build -o agentguard .          # append .exe on Windows

Three ways to run it

1. demo — see it work, zero config:

sh
agentguard demo

Runs all three tools on sample inputs and prints the results.

2. stdio (default) — local use; the MCP client launches the binary. No port; the client manages its lifecycle. Use any of the configs above, then ask your agent: "scan this for secrets", "is lodash 4.17.20 vulnerable?", "check my package.json for vulnerable deps."

3. serve — Streamable HTTP service on a port (for a hosted/remote server):

sh
agentguard serve :8080          # or set PORT=8080# health:   GET  http://host:8080/healthz# MCP URL:  POST http://host:8080/mcp   (clients connect to this URL)

Use stdio for local use; use serve when you want a hosted server users connect to by URL without installing anything.

Notes

  • scan_secrets runs locally and never returns raw secret values — only masked previews.
  • scan_dependencies caps at 200 deps per call and queries OSV concurrently.
  • check_cve / scan_dependencies need network access to OSV.dev; scan_secrets is fully offline.

License

MIT.

來源:README.md,提交 2fe4239

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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