[go: up one dir, main page]

Skip to main content

Open source · MIT · No account

Keep your secrets and your files safe from your coding agent.

zn-gate runs on your machine and stops the risky moves before they happen: reading your .env, leaking a key, deleting your home folder, following instructions hidden in a web page.

npx -y zn-gate init

Sets up protection for the coding agents it finds. Asks before each change.

Look first, change nothing:

npx -y zn-gate reach

Read only. Shows what your agents can reach. Sends nothing.

Quickstart GitHub

A terminal session. zn-gate reach lists what a coding agent can reach on this machine. Then zn-gate blocks a read of the .env file and the command rm -rf ~, and names the rule that fired.
A real run of zn-gate 1.17.0 on a test project with a fake key: what an agent can reach, then two things it should not be able to do.

One gate for every agent you use.

Works with 7 agents

  • Claude CodeCLI
  • Codex CLICLI
  • Cursoreditor
  • OpenCodeCLI
  • Antigravityeditor
  • ZCodedesktop app
  • GitHub Copiloteditor

MIT licensed · Runs on your machine · Claude Code, Codex CLI, Cursor, OpenCode, Antigravity, ZCode desktop app, GitHub Copilot · Experimental: Gemini CLI

7
coding agents with hooks
0
accounts needed to run it locally
MIT
license, for everything that runs on your machine
1
command to install

Gemini CLI: experimental5,566 npm downloads in the last 30 days

What it stops

Everything below runs on your machine, before your agent acts.

Secrets

Scrubber: secret values stay away from the model

Your agent works with typed placeholders like __ZN_AWS_KEY_1__. The real value is injected only where you allow it, when a command runs. It covers the secrets in your environment and .env files and keys with a known format; see the docs for what it does not catch yet.

agent reads

STRIPE_SECRET_KEY=sk_live_••••••••••••••••

model sees

STRIPE_SECRET_KEY=__ZN_STRIPE_KEY_1__

Learn more

Commands

Commands that wipe things are refused

zn-gate blocks a recursive delete of your home folder, the filesystem root or a system folder, and writes to a disk device. Four more rules are one setting away, such as piping a download straight into a shell. It is a guardrail against a model mistake, not a sandbox.

agent runs

rm -rf ~

refused: it deletes the home folder

rule: destructive:rm_root_home

Destructive command rules

Hidden instructions

Galvanize: prompt injection checks

Tool output, files and pages are checked before your agent acts on them. Local rules run on your machine; the optional cloud check uses our open-weights Galvanize model.

check_tool_result

README.md · allowed

fetched page · blocked: hidden instructions

checked on your machine, before your agent acts

Learn more

Reach and Scan

See what your agents can reach, and audit what they are about to trust

reach lists the secrets, credential files and MCP servers your agents can touch. It is read only and sends nothing. One command checks prompt templates, AGENTS.md and SKILL.md files and configs for injection traps and leaked secrets. It exits with code 1 when it finds something, so it also works in CI.

$ npx -y zn-gate scan .

Findings (2):

AGENTS.md:14 Threat

.env:3 Secret found

exit 1

Scan

What reach shows

Three commands.

Run them in your own terminal.

  1. npx -y zn-gate reach

    See what your agents can reach. Read only.

  2. npx -y zn-gate init

    Set up protection for the agents it finds. You confirm each step.

  3. npx -y zn-gate check

    Test it with a fake secret in a temporary folder.

Then move your .env values into the local vault: npx -y zn-gate env shadow .env

Nothing leaves your machine unless you turn on the cloud check.
Nothing leaves your machine unless you turn on the cloud check.

Numbers, with their method.

We publish detection figures together with the test set, the script, the hardware and the date.

Galvanize 3.1, the model behind the optional cloud check.

96.4%
of attacks caught3,309 multilingual test examples
1.9%
of short harmless texts flagged37 of 1,987. Galvanize 3 flagged 0.6%.
1.2%
of 658 long harmless documents flagged

These figures are for the optional cloud classifier only, not for the local rules. No detector catches every injection: keep least privilege on your agent tools.

Read the Galvanize 3.1 results GitHub Hugging Face Run the benchmark scripts

Start free. Add the cloud or your team when you need it.

Solo developers and vibecoders

Everything that runs on your machine is free and open source, with no account.

Install zn-gate

Teams of 2 to 50

One audit trail across every machine, roles, and an auditor who can export it. $19 per seat per month, $15 billed yearly. 14-day trial.

See Team

Building with the API

10,000 free calls a month, no card. Pro is $19 a month.

See pricing

Prepaid credits never expire. Inputs are evaluated in memory and discarded.

Questions

Does it send my code or secrets anywhere?

No. Nothing is sent by default. If you turn on the optional cloud check, detected secrets are removed on your machine first; personal data is not removed.

What leaves your machine
Which agents does it work with?

Claude Code, Codex CLI, Cursor, OpenCode, Antigravity, ZCode desktop app and GitHub Copilot. Gemini CLI is experimental. In other editors it works as an MCP server only.

Install guide
Is it a sandbox?

No. It is a guardrail that reads what your agent is about to do and refuses the risky shapes. The threat model lists what it does not cover.

Threat model
Do I need an account?

Not for anything that runs on your machine. An account is only for the optional cloud and for Team.

How do I remove it?

npx -y zn-gate uninstall shows what it will remove and asks first.

Remove zn-gate

Get started

Protect your agents in one command.

Free, open source, no account. It asks before each change.

npx -y zn-gate init

Look first, change nothing: npx -y zn-gate reach

What is new: zn-gate 1.17.0: GnuPG keys protected, tighter command checks, clearer errors →

Early-stage startup? Get free cloud access through our startup program →