
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Local gateway for controlling Claude Code from a webpage.
Note: This is a proof-of-concept for educational and experimental use. It demonstrates how to bridge browser-based interfaces with local CLI tools via HTTP/SSE. Use at your own discretion.
claude --version)npx ccgate https://myapp.example.com
This starts a local server on http://localhost:3456 that bridges HTTP/SSE requests to the Claude Code CLI, allowing requests from the specified origin (plus localhost).
Browser ──HTTP POST──▶ ccgate (localhost:3456) ──spawn──▶ Claude Code CLI
▲ │ │
└──────── SSE stream ────────┴────────────────────────────────────┘
The gateway spawns Claude Code with --print --continue, so conversation history persists per project directory (stored in ~/.claude/projects/).
GET /healthHealth check endpoint.
curl http://localhost:3456/health
GET /projectsLists Claude Code projects discovered from the session store (~/.claude/projects/).
curl http://localhost:3456/projects
GET /sessionsLists conversation sessions for a project.
curl "http://localhost:3456/sessions?cwd=/path/to/project"
Returns session metadata including sessionId, firstPrompt, created, modified, gitBranch, and projectPath. Reads from sessions-index.json when available, falling back to scanning JSONL session files.
POST /promptSends a prompt to Claude Code. Returns an SSE stream.
curl -N -X POST http://localhost:3456/prompt \
-H "Content-Type: application/json" \
-d '{"prompt": "Hello", "cwd": "/path/to/project"}'
Request body:
prompt (required): The prompt to sendcwd (optional): Working directory (must be under $HOME)sessionId (optional): Resume a specific session (uses --resume). If omitted, continues the most recent session (--continue).SSE events:
start - Processing startedchunk - Response content chunkstderr - Stderr output from Claudedone - Processing complete (includes exit code)error - Error occurrednpx ccgate <origin> # Start the gateway for the specified origin
npx ccgate --help # Show help
The origin is required and must be an http(s) URL. Localhost is always allowed in addition to the specified origin.
| Variable | Default | Description |
|---|---|---|
PORT | 3456 | Port to listen on |
This tool is designed for local development use only.
Security scanners may flag the following capabilities. Here's why each is needed:
| Capability | Why It's Needed |
|---|---|
| Spawns child processes | Invokes the claude CLI to handle prompts |
| HTTP server | Accepts requests from your browser/webapp |
| Filesystem access | Reads session data from ~/.claude/projects/ |
127.0.0.1, not accessible from other machinesOrigin header are rejected with 403 (prevents malicious webpages from triggering CLI commands via no-cors fetch)localhost, 127.0.0.1, and the origin specified on the command line~/.claude/projects/ — no home directory scanningcwd parameter must resolve to a path under $HOME; symlinks are resolved to prevent traversal attacksNODE_OPTIONS, LD_PRELOAD, etc.)spawn(), not through a shellpostinstall, etc.)This gateway trusts any process running on localhost. If you have malicious software on your machine, it could send requests to the gateway. This is the same trust model as other local development tools (webpack-dev-server, Vite, etc.).
Not recommended for:
Localhost origins (localhost:* and 127.0.0.1:*) are always allowed.
The origin you specify on the command line is the only additional origin allowed:
npx ccgate https://myapp.example.com
This explicit approach ensures you always know which origin is authorized—no hidden config files.
MIT
FAQs
Local gateway for controlling Claude Code from a webpage
We found that ccgate demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.