New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more โ†’
Get Started

@node9/proxy

Package Overview
Dependencies
Maintainers
1
Versions
241
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node9/proxy

The Sudo Command for AI Agents. Execution Security for Claude Code & MCP.

Source
npmnpm
Version
1.0.14
Version published
Weekly downloads
1.2K
-47.4%
Maintainers
1
Weekly downloads
ย 
Created
Source

๐Ÿ›ก๏ธ Node9 Proxy

The "Sudo" Command for AI Agents.

NPM Version License: Apache-2.0 Open in HF Spaces

Node9 is the execution security layer for the Agentic Era. It encases autonomous AI Agents (Claude Code, Gemini CLI, Cursor, MCP Servers) in a deterministic security wrapper, intercepting dangerous shell commands and tool calls before they execute.

While others try to guess if a prompt is malicious (Semantic Security), Node9 governs the actual action (Execution Security).

๐Ÿ’Ž The "Aha!" Moment

AIs are literal. When you ask an agent to "Fix my disk space," it might decide to run docker system prune -af.

With Node9, the interaction looks like this:

  • ๐Ÿค– AI attempts a "Nuke": Bash("docker system prune -af --volumes")
  • ๐Ÿ›ก๏ธ Node9 Intercepts: An OS-native popup appears immediately.
  • ๐Ÿ›‘ User Blocks: You click "Block" in the popup.
  • ๐Ÿง  AI Negotiates: Node9 explains the block to the AI. The AI responds: "I understand. I will pivot to a safer cleanup, like removing only large log files instead."

โšก Key Features

๐Ÿ The Multi-Channel Race Engine

Node9 initiates a Concurrent Race across all enabled channels. The first channel to receive a human signature wins and instantly cancels the others:

  • Native Popup: OS-level dialog (Mac/Win/Linux) for sub-second keyboard dismissal.
  • Browser Dashboard: Local web UI for deep inspection of large payloads (SQL/Code).
  • Cloud (Slack): Remote asynchronous approval for team governance.
  • Terminal: Classic [Y/n] prompt for manual proxy usage and SSH sessions.

๐Ÿง  AI Negotiation Loop

Node9 doesn't just "cut the wire." When a command is blocked, it injects a Structured Negotiation Prompt back into the AI's context window. This teaches the AI why it was stopped and instructs it to pivot to a safer alternative.

โช Shadow Git Snapshots (Auto-Undo)

Node9 takes a silent, lightweight Git snapshot before every AI file edit. If the AI hallucinates and breaks your code, run node9 undo to instantly revert โ€” with a full diff preview before anything changes.

# Undo the last AI action (shows diff + asks confirmation)
node9 undo

# Go back N actions at once
node9 undo --steps 3

๐ŸŽฎ Try it Live

No install needed โ€” test Node9's policy engine against real commands in the browser:

Open in HF Spaces

๐Ÿš€ Quick Start

# Recommended โ€” via Homebrew (macOS / Linux)
brew tap node9-ai/node9
brew install node9

# Or via npm
npm install -g @node9/proxy

# 1. Wire Node9 to your agent
node9 setup           # interactive menu โ€” picks the right agent for you
node9 addto claude    # or wire directly
node9 addto gemini

# 2. Enable shields for the services you use
node9 shield enable postgres
node9 shield enable aws

# 3. Verify everything is wired correctly
node9 doctor

๐Ÿ›ก๏ธ How Protection Works

Node9 has two layers of protection. You get Layer 1 automatically. Layer 2 is one command per service.

Layer 1 โ€” Core Protection (Always On)

Built into the binary. Zero configuration required. Protects the tools every developer uses.

What it protectsExample blocked action
Gitgit push --force, git reset --hard, git clean -fd
Shellcurl ... | bash, sudo commands
SQLDELETE / UPDATE without a WHERE clause
Filesystemrm -rf targeting home directory

Layer 2 โ€” Shields (Opt-in, Per Service)

Shields add protection for specific infrastructure and services โ€” only relevant if you actually use them.

ShieldWhat it protects
postgresBlocks DROP TABLE, TRUNCATE, DROP COLUMN; reviews GRANT/REVOKE
githubBlocks gh repo delete; reviews remote branch deletion
awsBlocks S3 bucket deletion, EC2 termination; reviews IAM changes, RDS deletion
filesystemReviews chmod 777, writes to /etc/
node9 shield enable postgres    # protect your database
node9 shield enable aws         # protect your cloud infrastructure
node9 shield list               # see all available shields
node9 shield status             # see what's currently active

๐Ÿ›  Protection Modes

ModeTargetHow it works
Hook ModeClaude, Gemini, Cursornode9 addto <agent> wires native pre-execution hooks.
Proxy ModeMCP Servers, Shellnode9 "npx <server>" intercepts JSON-RPC traffic.
Manual ModeYounode9 rm -rf / protects you from your own typos.

๐Ÿ”— Configuration Precedence

Node9 merges configuration from multiple sources in priority order. Higher tiers win:

TierSourceNotes
1Environment variablesNODE9_MODE=strict overrides everything
2Cloud / Org policySet in the Node9 dashboard โ€” cannot be overridden locally
3Project confignode9.config.json in the working directory
4Global config~/.node9/config.json
5Built-in defaultsAlways active, no config needed

Settings (mode, approvers, timeouts) follow the table above โ€” higher tier wins. A project config overrides a global config.

Smart rules work differently. All layers are concatenated into a single ordered list and evaluated first-match-wins:

built-in defaults โ†’ global config โ†’ project config โ†’ shields โ†’ advisory defaults

Because built-in block rules sit at the front of this list, they always fire before any user-defined allow rule. A project or global config cannot bypass Layer 1 protection. Within the user layers, a project block rule fires before a shield block rule โ€” so project policy can tighten or selectively override a shield.

โš™๏ธ Custom Rules (Advanced)

Most users never need this. If you need protection beyond Layer 1 and the available shields, add Smart Rules to node9.config.json in your project root or ~/.node9/config.json globally.

Smart Rules match on raw tool arguments using structured conditions:

{
  "policy": {
    "smartRules": [
      {
        "name": "block-prod-deploy",
        "tool": "bash",
        "conditions": [
          { "field": "command", "op": "matches", "value": "kubectl.*--namespace=production" }
        ],
        "verdict": "block",
        "reason": "Deploying to production requires a manual release process"
      }
    ]
  }
}

Smart Rule fields:

FieldDescription
toolTool name or glob ("bash", "mcp__postgres__*", "*")
conditionsArray of conditions evaluated against the raw args object
conditionMode"all" (AND, default) or "any" (OR)
verdict"review" (approval prompt) | "block" (hard deny) | "allow" (skip all checks)
reasonHuman-readable explanation shown in the approval prompt and audit log

Condition operators:

opMeaning
matchesField value matches regex (value = pattern, flags = e.g. "i")
notMatchesField value does not match regex (value = pattern, flags optional)
containsField value contains substring
notContainsField value does not contain substring
existsField is present and non-empty
notExistsField is absent or empty
matchesGlobField value matches a glob pattern (value = e.g. "**/node_modules/**")
notMatchesGlobField value does not match a glob pattern

The field key supports dot-notation for nested args: "params.query.sql".

Use node9 explain <tool> <args> to dry-run any tool call and see exactly which rule would trigger.

Settings

{
  "settings": {
    "mode": "standard",
    "enableUndo": true,
    "approvalTimeoutMs": 30000,
    "approvers": {
      "native": true,
      "browser": true,
      "cloud": true,
      "terminal": true
    }
  }
}
KeyDefaultDescription
mode"standard"standard | strict | audit
enableUndotrueTake git snapshots before every AI file edit
approvalTimeoutMs0Auto-deny after N ms if no human responds (0 = wait forever)
approvers.nativetrueOS-native popup
approvers.browsertrueBrowser dashboard (node9 daemon)
approvers.cloudtrueSlack / SaaS approval
approvers.terminaltrue[Y/n] prompt in terminal

๐Ÿ–ฅ๏ธ CLI Reference

CommandDescription
node9 setupInteractive menu โ€” detects installed agents and wires hooks for you
node9 addto <agent>Wire hooks for a specific agent (claude, gemini, cursor)
node9 initCreate default ~/.node9/config.json
node9 statusShow current protection status and active rules
node9 doctorHealth check โ€” verifies binaries, config, credentials, and all agent hooks
node9 shield <cmd>Manage shields (enable, disable, list, status)
node9 explain <tool> [args]Trace the policy waterfall for a given tool call (dry-run, no approval prompt)
node9 undo [--steps N]Revert the last N AI file edits using shadow Git snapshots
node9 checkCalled by agent hooks; evaluates a pending tool call and exits 0 (allow) or 1 (block)

node9 doctor

Node9 Doctor  v1.2.0
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Binaries
  โœ…  Node.js v20.11.0
  โœ…  git version 2.43.0

Configuration
  โœ…  ~/.node9/config.json found and valid
  โœ…  ~/.node9/credentials.json โ€” cloud credentials found

Agent Hooks
  โœ…  Claude Code โ€” PreToolUse hook active
  โš ๏ธ  Gemini CLI โ€” not configured (optional)
  โš ๏ธ  Cursor โ€” not configured (optional)

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
All checks passed โœ…

node9 explain

Dry-runs the policy engine and prints exactly which rule would fire โ€” useful for debugging:

node9 explain bash '{"command":"rm -rf /tmp/build"}'
Policy Waterfall for: bash
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Tier 1 ยท Cloud Org Policy       SKIP  (no org policy loaded)
Tier 2 ยท Dangerous Words        BLOCK โ† matched "rm -rf"
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Verdict: BLOCK  (dangerous word: rm -rf)

๐Ÿ”ง Troubleshooting

node9 check exits immediately / Claude is never blocked Node9 fails open by design to prevent breaking your agent. Check debug logs: NODE9_DEBUG=1 claude.

Terminal prompt never appears during Claude/Gemini sessions Interactive agents run hooks in a "Headless" subprocess. You must enable native: true or browser: true in your config to see approval prompts.

"Blocked by Organization (SaaS)" A corporate policy has locked this action. You must click the "Approve" button in your company's Slack channel to proceed.

๐Ÿ—บ๏ธ Roadmap

  • Multi-Channel Race Engine (Simultaneous Native/Browser/Cloud/Terminal)
  • AI Negotiation Loop (Instructional feedback loop to guide LLM behavior)
  • Resolution Waterfall (Cascading configuration: Env > Cloud > Project > Global)
  • Native OS Dialogs (Sub-second approval via Mac/Win/Linux system windows)
  • Shadow Git Snapshots (1-click Undo for AI hallucinations)
  • Identity-Aware Execution (Differentiates between Human vs. AI risk levels)
  • Shield Templates (node9 shield enable <service> โ€” one-click protection for Postgres, GitHub, AWS)
  • Content Scanner / DLP (Detect and block secrets like AWS keys and Bearer tokens in-flight)
  • Universal MCP Gateway (Standalone security tunnel for LangChain, CrewAI, and any agent without native hooks)
  • Cursor & Windsurf Hook (Native hook support for AI-first IDEs)
  • VS Code Extension (Approval requests in a native sidebar โ€” no more OS popups)
  • Execution Sandboxing (Simulate dangerous commands in a virtual FS before applying)
  • Multi-Admin Quorum (Require 2+ human signatures for high-stakes production actions)
  • SOC2 Tamper-proof Audit Trail (Cryptographically signed, cloud-managed logs)

๐Ÿข Enterprise & Compliance

Node9 Pro provides Governance Locking, SAML/SSO, and VPC Deployment. Visit node9.ai

Keywords

ai-security

FAQs

Package last updated on 21 Mar 2026

Related posts