# Penthera: your open-source cyber security agent
The security review you never had time for. Offline, rule-based, and you can verify every finding yourself.
**[penthera.org](https://penthera.org)**: check your live site in a few seconds. Passive, nothing stored.
Daily notes from Penthera: **[x.com/penthera_org](https://x.com/penthera_org)**
**Who builds it:** [Daan van der Zwaag](docs/trust.md#who-builds-it), part-time and in the open.
**How it compares:** [next to Snyk, Socket, Semgrep, ZAP and GitHub](#how-it-fits-with-other-tools).
**New in 2.5:** `penthera diff` shows only the findings your branch added, the brief puts what an attacker can reach first, and a deep review of the rules closed the places where a check stopped reading early ([what changed](CHANGELOG.md)).
**From your coding agent:** add Penthera ([one line per agent](#start-in-30-seconds)), then say "Hey Claude, run Penthera on this repo."
**135** readable rules · **6** read-only MCP tools · **0** runtime dependencies · **0** requests past loopback in the benchmark · **MIT**, no telemetry
[](https://www.npmjs.com/package/penthera)
[](https://www.npmjs.com/package/penthera)
[](https://github.com/danoszz/penthera/stargazers)


[](https://github.com/danoszz/penthera/actions/workflows/ci.yml)
[](https://scorecard.dev/viewer/?uri=github.com/danoszz/penthera)
[](https://socket.dev/npm/package/penthera)
[](https://glama.ai/mcp/servers/danoszz/penthera)
| `penthera ui`, Simple, dark | `penthera ui`, Advanced, light |
|---|---|
|  |  |
---
## What it is
Penthera checks your app, its dependencies and your AI coding tools on your own
machine. It fixes what it can, with your approval. Every finding comes from a
rule you can read, with its evidence at `file:line`. A model may propose; a rule
decides.
It is also an open R&D project. We measure every check in public and publish
the results, good or bad, so you can see how far to trust it.
It finds known classes of problems, not novel ones. It does not replace a human
pentester.
## Start in 30 seconds
You need Node.js 22 or later. No install, no account.
Building with Cursor, Claude Code, Codex, VS Code, Windsurf, Gemini CLI, Zed,
JetBrains or Kiro, or an app builder such as Lovable, Bolt, Base44, Replit or
v0? [Penthera in your coding tool](docs/integrations.md) has the setup for
each.
**In your terminal.** Run this in your project folder:
```bash
npx penthera
```
It detects your setup offline, asks what to check, and gives you a grade per
area and the three things to fix first. It scans your running app only after
you confirm the app is yours. Nothing is committed or pushed
([guided start](docs/commands/init.md)).
**In your coding agent.** Pick yours, then ask "scan my app for security
issues". The MCP lines pin the version.
| Agent | Run this |
|---|---|
| Claude Code, plugin (skill only, runs the CLI) | `claude plugin marketplace add danoszz/penthera`, then `claude plugin install penthera@penthera` |
| Claude Code, MCP server only | `claude mcp add penthera -- npx -y penthera@2.5.0 mcp` |
| Codex | `codex mcp add penthera -- npx -y penthera@2.5.0 mcp` |
| GitHub Copilot CLI | `copilot plugin marketplace add danoszz/penthera`, then `copilot plugin install penthera@penthera` |
| GitHub Copilot in VS Code | the `code --add-mcp` line in [mcp.md](docs/commands/mcp.md#github-copilot) |
| Gemini CLI | `gemini extensions install https://github.com/danoszz/penthera` |
| Cursor, Windsurf | the JSON in [mcp.md](docs/commands/mcp.md#cursor-and-windsurf) |
| Any agent that reads skills | `npx skills add danoszz/penthera` |
The skill tells your agent how to run Penthera; the MCP server gives it six
read-only tools. More routes: [skill.md](docs/commands/skill.md),
[mcp.md](docs/commands/mcp.md).
**Where AI fits.** Rules decide every finding and every exit code. A model may
only propose:
| Role | Who | How |
|---|---|---|
| Decides | Penthera's rules, always | Every finding, every exit code |
| Looks further (optional) | A model, with `--ai` | Proposes problems no rule describes; the rules check each one, and unchecked ones are listed apart and never fail CI ([AI mode](docs/ai-mode.md)) |
| Fixes | Your own coding agent | Through the MCP server, the skill or `penthera fix --plan` |
To run it in a container:
`docker build -t penthera . && docker run --rm penthera https://your-app.example`.
## Public benchmarks
We test Penthera on public datasets that other people built, next to the free
open-source tools that do the same job, scored the same way. Each dataset was
split in half before we looked: we improved Penthera on one half and scored it
once on the other, sealed half. The rules for scoring and ranking were written
down before that run ([protocol](docs/research/prereg/E11b-improvement-study.md)).
| Benchmark | Score | Penthera 1.9.0 | **Penthera 2.0.0** | Rank among free tools | Best other free tool |
|---|---|---|---|---|---|
| [Leaked secrets (Samsung CredData)](https://penthera.org/benchmarks/secrets) | F1 | 0.18 | **0.74** | **2nd of 10** | deepsecrets 0.78 |
| [Malicious npm packages (DataDog)](https://penthera.org/benchmarks/npm-malware) | caught minus false alarms | 0.57 | **0.71** | **1st of 6, tied 1st to 3rd** ⁴ | malcontent 0.63 |
| [Malicious PyPI packages (DataDog)](https://penthera.org/benchmarks/pypi-malware) | caught minus false alarms | 0.74 | **0.82** | **1st of 8, tied 1st to 3rd** ⁴ | GuardDog 0.74 |
| [Injection bugs in JS libraries (SecBench.js)](https://penthera.org/benchmarks/js-injection) | found in the right file | 0.16 | **0.70** | **1st of 8, tied 1st to 4th** ⁴ | odgen 0.68 |
⁴ A tied range is a rank interval: the range Penthera's rank fell in, in 95% of 10,000 bootstrap redraws of each tool's counts (on SecBench.js, of its 64 test bugs). Penthera alone came out first in 76% of the redraws on npm, 82% on PyPI and 60% on SecBench.js. Exploratory: computed after the registered ranking.
Leaked secrets: 2nd by F1, the registered score; 1st by F0.5, which weighs precision more (0.82 against deepsecrets 0.80); 2nd by F2, which weighs recall more (0.68 against deepsecrets 0.77).
Some ranked tools are barely in the contest. Other ranked tools scoring below 0.10: 1 of 9 on CredData (trufflehog); 3 of 5 on npm (clamav, yara, ossgadget); 4 of 7 on PyPI (clamav, ossgadget, bandit4mal, aura); 1 of 7 on SecBench.js (njsscan).
If 1 package in 1,000 were malicious, the share of Penthera's malware flags that would be right: npm, about 2.7% at the top of the false-alarm interval (it raised no false alarm on that sample); PyPI, about 1.6% at the measured false-alarm rate, 0.9% at the top of its interval. Exploratory, like the rank intervals.