
Zyrax Guard
io.github.tiagosilva07由 GitHub 帳號 tiagosilva07 發布v0.13.0更新於 Oct 24, 2026
Audit AI agent configs for prompt injection & rogue MCP servers; vet packages
概覽
稽核 AI 代理設定檔中的提示注入與可疑 MCP 伺服器,並在安裝前審查套件。
- 可以做什麼
- Zyrax Guard 會掃描 CLAUDE.md、AGENTS.md、GEMINI.md、.mcp.json、.claude/settings.json、Cursor 規則與 SKILL.md 等代理設定檔,偵測提示注入關鍵字、隱藏 Unicode 字元、Base64 編碼指令、條件觸發指令、非 HTTPS 或原始 IP 的 MCP 伺服器位址、通道服務、危險 shell 呼叫、憑證檔案引用以及資料外傳行為。它也能審查 npm、PyPI、crates.io 與 Go 模組中的單一套件與鎖定檔,檢查存在性、仿冒名稱、已知惡意公告、發佈時間與下載量以及鎖定檔完整性,並可選對安裝與建置指令碼做靜態深度檢查。作為 MCP 伺服器,它提供 scan_agents 與 check_package 工具,讓代理在安裝前先稽核設定並檢查套件。
- 適用情境
- 當你複製或執行會驅動 AI 編碼代理的儲存庫,並希望在代理執行前找出遭竄改或惡意的代理設定時使用。它也適合 CI 拉取請求閘門與相依套件安裝前審查,包括代理建議安裝的套件。
- 執行需求
- 以 stdio 本機程序方式執行;npm 套件內含預先建置的 Go 二進位檔,使用 npx 需要 Node 18+。不需要帳號、API 金鑰或環境變數。套件檢查需要連線至公開登錄庫與弱點公告 API;代理設定掃描在本機完成。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Zyrax Guard,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Zyrax Guard
[CI] [License: MIT] [Go Report Card] [Website]
Audit your AI agent configs before you run them.
Catch the prompt injection, malicious MCP servers, and credential-exfil hiding in the
files that steer your AI — CLAUDE.md, .mcp.json, agent settings, skills — and vet the
packages they pull in. In milliseconds. Nothing leaves your machine.
Works locally, in CI, and as a gate for AI coding agents. No account required. Nothing phones home except the public package name you are querying.
Get it (pick one):
Then: zyrax-guard scan-agents . to audit configs, or zyrax-guard check <pkg> to vet a package.
Full install options (signed binary, curl|sh) and verification are below.
🌐 Homepage: zyrax.io
Install
npm / npx
Ships the prebuilt Go binary per-platform (via optionalDependencies) — no runtime
download. Works anywhere Node 18+ is available.
Homebrew (macOS / Linux)
Installs the signed release binary (SHA-256 verified by Homebrew). Updates land via
brew upgrade once a new release is published.
Scoop (Windows)
Installs the signed release binary (SHA-256 verified by scoop against the manifest, whose
hashes come from the release's signed checksums.txt). zyrax-guard upgrade detects a
scoop install and delegates to scoop update zyrax-guard.
Quick install (Linux / macOS)
Downloads the signed release binary for your OS/arch, verifies its SHA-256 against
the release checksums, and installs it (to /usr/local/bin, or ~/.local/bin if that
is not writable). Pin a version with VERSION=v0.5.0, or set BINDIR to choose where
it lands. Verifies the cosign signature too when cosign is on your PATH.
go install (Go 1.23+)
Signed release binary
Download from Releases. Every release ships:
- Pre-built binaries for linux/darwin/windows × amd64/arm64
checksums.txt(SHA-256)- SLSA L3 build provenance (
.cosign.bundleper artifact) - SBOM (
zyrax-guard.spdx.json)
Verify a binary:
Build from source
Updating
Guard checks for a newer release at most once a day (a read-only lookup of its own version
on registry.npmjs.org) and prints a one-line notice on stderr when one is available. To
update:
upgrade delegates to your package manager (npm/brew/scoop/go) when Guard was installed
that way; for curl|sh / standalone-binary installs on Linux/macOS it downloads the signed release,
verifies its SHA-256 against checksums.txt and its keyless cosign signature before replacing
the binary (any mismatch aborts the upgrade). Signature verification is required by default
— if cosign is not installed the upgrade aborts with instructions; pass
--require-signature=false to accept checksum-only verification explicitly. On Windows, install
via scoop to get delegated upgrades; the standalone
Windows binary is still upgraded manually (the notice links to Releases).
Disable the daily check with ZYRAX_NO_UPDATE_CHECK=1.
Quickstart
Audit AI agent configs
Scans CLAUDE.md, AGENTS.md, GEMINI.md, .mcp.json, .claude/settings.json,
and Cursor rules files. Exits 1 if any CRITICAL or HIGH finding is found.
Check a single package
Check-then-install
Allow a package (add to local policy)
Commit .zyrax/policy.json — it is the reviewable allowlist for your project.
Scan a PR's lockfile diff
Emits SARIF 2.1.0 to stdout. Exit code 0 if no BLOCK or ERROR; non-zero otherwise.
Add --strict to treat WARN as failure.
Auditing AI agent configs (scan-agents)
AI coding agents (Claude Code, Cursor, Gemini CLI) read configuration files that can be
weaponized: a malicious CLAUDE.md in a repo you clone, a tampered .mcp.json that
points to an attacker's server, an MCP tool whose description hides instructions, a
settings.json granting wildcard shell access, or prose that quietly steers the agent
toward reading .env and POSTing it out. Guard detects these before the agent runs.
What it scans
What it detects
Exit code: 1 if any CRITICAL or HIGH finding; 0 otherwise. Use --strict for exit 1 on any finding.
Obfuscation-normalized. Before matching, detection normalizes common disguises — zero-width and
format characters, homoglyphs, full-width and leetspeak substitutions, and separator/line splitting —
so trivially obscured payloads (y0u 4r3 n0w…, ignore—previous—instructions, Cyrillic look-alikes)
are still caught. It stays a fast, deterministic, on-device guardrail for known agent-config
attack patterns — not a complete defense against a determined adversary who paraphrases or writes in
another language. Semantic detection is a roadmap item for the Zyrax platform, not the local CLI.
Suppressing a legitimate collision. A real skill or config can legitimately phrase something the
heuristics flag (e.g. a reviewer skill that says "act as a senior reviewer"). Silence it with an
inline zyrax-allow comment on that line — optionally zyrax-allow: <rule-prefix> to scope it — or
zyrax-allow-file: <rule-prefix> for a whole file. Suppression is never silent: the scan always
reports N finding(s) suppressed by zyrax-allow, and --strict ignores suppressions entirely
(audit/CI mode), so a hostile config can't use the directive as a kill switch.
In CI
Via MCP (scan_agents tool)
Once registered as an MCP server, agents also have access to scan_agents:
GitHub Action
Gate every pull request. By default (scan: both) Zyrax Guard audits AI agent configs
(prompt injection, malicious MCP servers, risky permissions) and gates dependencies
added in the PR, failing the check if anything is blocked. Add
.github/workflows/zyrax-guard.yml:
Pin for production: these examples pin third-party actions to commit SHAs — mutable tags are a supply-chain risk (the exact risk Guard exists to catch). Pin
zyrax-guardto an exact version or commit SHA too for fully reproducible CI.
On a pull request it scans only the dependencies added versus the base branch; otherwise
it scans the whole lockfile. The job fails when a dependency is blocked. @v0 tracks the
latest 0.x release; pin an exact version (e.g. @v0.7.1) for fully reproducible CI.
Inputs (all optional): scan (deps | agents | both, default both), ecosystem
(default npm), lockfile (default per-ecosystem), base (explicit base lockfile),
strict (treat WARN as failure), deep (inspect install scripts), version (Guard
release, default latest), fail-on-block (default true), sarif-file (write
dependency SARIF for Code Scanning), agents-sarif-file (write agent-config SARIF for
Code Scanning), args (extra raw flags).
Upload results to GitHub Code Scanning so findings show up inline on the PR:
Audit agent configs and dependencies, both surfaced in Code Scanning:
(That job needs permissions: { security-events: write }.)
Ecosystems
Guard supports npm, PyPI, crates.io, and Go modules. Pick one with --ecosystem
(default npm):
Go modules are queried against proxy.golang.org (the standard Go module proxy — no
auth, no download-count API). Two differences from the other ecosystems, both
by design:
- Typosquat/popularity checks are skipped. Unlike npm/PyPI/crates.io, the module proxy has no download-count endpoint, so Guard has no real usage signal to compare against — it reports "download statistics unavailable" rather than fabricate a "0 downloads" typosquat verdict against a real module. Existence and known-malware (OSV) checks still run normally.
--deepreports "no install/build scripts found" for every Go module.go get/go mod downloadnever execute code from the fetched module — there is no npm-postinstall/pip-setup.py/cargo-build.rs analog to statically analyze.
How the checks work
Guard runs against public registry metadata only — no local execution, no installs, no sandboxing:
Transient registry/OSV failures (429 or 5xx) are retried with backoff (honoring Retry-After)
before Guard gives up; only a persistent failure yields ERROR (fail closed — see Verdicts).
Deep check (--deep)
By default checks are metadata-only (milliseconds). Add --deep to also download the
package's distribution artifact and statically inspect the code it runs at install/build
time — npm preinstall/install/postinstall scripts, PyPI setup.py, crates build.rs
(Go modules have no such hook — see Ecosystems):
It flags red-flag patterns — network calls, process spawning, base64/obfuscated eval —
and BLOCKs on dangerous combinations (e.g. "download a script and run it"). It runs
no code (purely static) and is best-effort: if the artifact cannot be fetched you
get an informational note, never a false block.
Zero added dependencies — the extractor uses stdlib archive/tar + compress/gzip only.
Verdicts
Guard fails closed: if it cannot reach the registry or the malware database, it returns ERROR and exits non-zero rather than letting an unverified package through. Disrupting the network cannot silently bypass the gate.
Configuration
Zyrax Guard is configured entirely through command flags and an optional local policy file — no config file or environment variables required.
Commands
Flags
Local policy file
zyrax-guard allow <name> [--reason "why"] records decisions in .zyrax/policy.json at
the project root. Every allow is timestamped (UTC); a reason is optional but recorded
alongside it when given, so a teammate reviewing the diff sees why a package was trusted,
not just its name:
Both forms are accepted on load — a bare string is still a valid entry, so files written
before reason/at existed keep working unchanged.
Allowlisted packages skip checks; denylisted packages always BLOCK. Commit the file to
share policy across a team. (Org-wide policy is a paid drop-in via the Policy seam.)
Guard deliberately does not offer an inline "block or continue?" prompt at check time:
an AI agent driving the CLI could auto-answer such a prompt, and non-interactive contexts
(CI, scripts) can't answer one at all. allow requires a separate, deliberate command —
outside whatever automated loop hit the BLOCK — and leaves a reviewable trail in git.
Exit codes
See Verdicts for package verdict meanings.
Make it automatic — shell hook
The shell hook intercepts npm install / pip install / cargo add / go get
transparently. Every new package gets checked before the real installer runs;
already-installed and non-install commands pass through untouched.
macOS / Linux (bash or zsh)
Add to ~/.bashrc, ~/.zshrc, or ~/.bash_profile:
Apply immediately without restarting your terminal:
Windows (PowerShell)
Add to your PowerShell profile ($PROFILE). To find and open it:
Add this line and save:
Apply immediately:
From now on every npm install, pip install, cargo add, or go get in a
PowerShell window is automatically checked before anything installs.
Using with AI coding agents
Register zyrax-guard mcp as an MCP server and your agent gains a scan_agents tool to
audit the configs it's about to act on — and a check_package tool it calls before every
install (AI agents hallucinate package names; attackers pre-register them as malware,
and Guard breaks that chain).
One-step register (recommended):
mcp install writes a standard .mcp.json (read by Claude Code, Cursor, and VS Code) and
auto-detects whether to register zyrax-guard mcp (binary on PATH) or npx -y zyrax-guard mcp.
Override with --command binary|npx. --global delegates to claude mcp add -s user (it prints
the manual command if the claude CLI isn't installed).
Manual one-liner (Claude Code):
→ MCP setup for Claude Code, Cursor, Windsurf, VS Code, and Continue.dev
Guard is on the official MCP registry as io.github.tiagosilva07/zyrax-guard — register it
in one line with npx -y zyrax-guard mcp.
Using in CI
Gate pull requests so a malicious or hallucinated dependency fails the build. The
GitHub Action is the quickest path; zyrax-guard scan recipes for
GitHub Actions, PyPI, crates.io, and Go modules live in the CI guide.
→ CI recipes (GitHub Actions PR gate, PyPI, crates.io, Go modules)
Privacy promise
Only the public package names you query leave your machine, as read-only lookups against public registry APIs:
registry.npmjs.org— existence and metadataapi.npmjs.org— download countsproxy.golang.org— Go module existence and version metadataapi.osv.dev— known advisoriesregistry.npmjs.org— Guard's own latest version (update check, ≤1×/day; disable withZYRAX_NO_UPDATE_CHECK=1)github.com— only when you runzyrax-guard upgrade(downloads the signed release binary)
No telemetry. No account. No secrets sent anywhere. The binary is reproducible
(-trimpath), and every release ships SLSA L3 provenance so you can verify the build
chain yourself.
Free & open source
Zyrax Guard is MIT-licensed and free — the agent-config auditor (scan-agents +
the scan_agents MCP tool), every package check, the PR gate with JSON/SARIF output, the
check_package MCP tool, and the shell hook. Read the code and verify the binary yourself.
A Zyrax platform for teams (organization-wide policy, continuous monitoring, dashboards, and audit/compliance reporting) is in development — learn more at zyrax.io.
Roadmap
The roadmap items drop in via the existing Ecosystem, ThreatIntel, Policy, and
Reporter seams — no re-architecting required.
License
MIT — see LICENSE.
來源:README.md,提交 122f74e
工具
0版本歷史
1- v0.13.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分