Skip to Content
ZeroLeaksDocs
zeroleaks package

zeroleaks package

Source-available CLI and TypeScript library that tests a system prompt for extraction and prompt injection on your machine with your own model API key.

The zeroleaks npm package is a standalone scanner for system prompts. It loads your prompt into a model you choose and tests that model in two ways. An extraction scan uses a multi-turn attacker that tries to get the model to reveal its own system prompt. An injection scan runs behavioral probes that try to get the model to follow planted instructions (in a document, a fake admin message, or a tool description) or to agree to misuse a tool. A judge model decides whether the target complied.

The package runs on your machine with your own model-provider API keys. Use it to harden prompt wording, run local experiments without an account, or add a low-cost prompt check to CI. The source is at github.com/ZeroLeaks/zeroleaks. These pages describe version 1.5.0.

License

The package is licensed under FSL-1.1-Apache-2.0, the Functional Source License. You can use, modify, and redistribute it for any purpose except offering a competing commercial product or service. Each release becomes available under Apache 2.0 two years after it is published or on January 21, 2028, whichever comes first.

Comparison with hosted ZeroLeaks

The zeroleaks package tests a system prompt. The target is a model you specify, running your prompt with no tools, memory, or application code. A finding means that model, given that prompt, leaked its instructions or followed an injected instruction in its reply.

Hosted ZeroLeaks tests a running agent. Through @zeroleaks/sdk runtime scans or endpoint scans, every probe goes through your real agent: its model settings, tools, memory, credentials, and the other agents it talks to. Findings come with a least-privilege policy or configuration fix, and later scans rerun the same attacks to catch regressions.

zeroleaks packageHosted ZeroLeaks
TargetA model running your system promptYour deployed or in-process agent
Tools, memory, peersNot exercisedReal tool calls and results are traced
Model accessYour OpenRouter or OpenAI API keyIncluded, one ZeroLeaks API key
OutputTerminal report or JSONStored reports with fixes and PDF export
PricingFree under FSL; you pay your model providerPaid plans (Pro, Team, Business, Enterprise), with a 14-day Pro trial

Hosted agent scans no longer run a system-prompt extraction loop. They run a secrets-in-context track instead, which scores what sensitive data leaked (credentials, internal hosts, tool schemas, approval rules), not whether the prompt was reproduced word for word. Hosted prompt scans are retired.

Next steps

On this page