pwnkit-cli 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -9
- package/dist/index.js +23 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<h1 align="center">pwnkit</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<strong>
|
|
9
|
-
<em>Scan LLM endpoints. Audit npm packages. Review source code. Re-exploit to kill false positives.</em>
|
|
8
|
+
<strong>General-purpose autonomous pentesting framework</strong><br/>
|
|
9
|
+
<em>Scan LLM endpoints. Audit npm packages. Review source code. Pentest web apps. Re-exploit to kill false positives.</em>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
-
pwnkit is an open-source agentic security toolkit. Autonomous agents discover, attack, verify, and report vulnerabilities
|
|
36
|
+
pwnkit is an open-source agentic security toolkit. Autonomous agents discover, attack, verify, and report vulnerabilities across LLM endpoints, web applications, npm packages, and Git repositories — the agents read code, craft payloads, analyze responses, and **re-exploit each finding to kill false positives**. No templates, no static rules — multi-turn agentic reasoning that thinks like an attacker.
|
|
37
37
|
|
|
38
38
|
One command. Zero config. Every finding re-exploited or dropped.
|
|
39
39
|
|
|
@@ -48,12 +48,33 @@ npx pwnkit-cli audit lodash
|
|
|
48
48
|
|
|
49
49
|
# Deep security review of a codebase
|
|
50
50
|
npx pwnkit-cli review ./my-ai-app
|
|
51
|
+
|
|
52
|
+
# Or just point pwnkit at a target — it auto-detects what to do
|
|
53
|
+
npx pwnkit-cli express # audits npm package
|
|
54
|
+
npx pwnkit-cli ./my-repo # reviews source code
|
|
55
|
+
npx pwnkit-cli https://github.com/user/repo # clones and reviews
|
|
56
|
+
npx pwnkit-cli https://example.com # scans web endpoint
|
|
51
57
|
```
|
|
52
58
|
|
|
53
59
|
That's it. pwnkit discovers your attack surface, launches targeted attacks, verifies findings, and generates a report — all in under 5 minutes.
|
|
54
60
|
|
|
61
|
+
### Auto-Detect
|
|
62
|
+
|
|
63
|
+
`pwnkit <target>` figures out what you mean without explicit subcommands:
|
|
64
|
+
|
|
65
|
+
| Input | What pwnkit does |
|
|
66
|
+
|-------|-----------------|
|
|
67
|
+
| `pwnkit express` | Treats it as an npm package name and runs `audit` |
|
|
68
|
+
| `pwnkit ./my-repo` | Detects a local path and runs `review` |
|
|
69
|
+
| `pwnkit https://github.com/user/repo` | Clones the repo and runs `review` |
|
|
70
|
+
| `pwnkit https://example.com` | Detects an HTTP URL and runs `scan` |
|
|
71
|
+
|
|
72
|
+
Explicit subcommands (`scan`, `audit`, `review`) still work — auto-detect is just a convenience layer on top.
|
|
73
|
+
|
|
55
74
|
## Commands
|
|
56
75
|
|
|
76
|
+
All commands are available via `npx pwnkit-cli <command>`. Explicit subcommands are optional — thanks to auto-detect, `npx pwnkit-cli <target>` works for most use cases (see [Auto-Detect](#auto-detect) above).
|
|
77
|
+
|
|
57
78
|
pwnkit ships five commands — from quick API probes to deep source-level audits:
|
|
58
79
|
|
|
59
80
|
| Command | What It Does | Example |
|
|
@@ -95,6 +116,7 @@ The **verification step is the differentiator.** No more triaging 200 "possible
|
|
|
95
116
|
| **LLM Endpoints** — ChatGPT, Claude, Llama APIs, custom chatbots | `scan --target <url>` | HTTP probing + multi-turn agent attacks |
|
|
96
117
|
| **MCP Servers** — Tool schemas, input validation, authorization | `scan --target <url> --mode mcp` | Connects to server, enumerates tools, tests each |
|
|
97
118
|
| **Web Apps & APIs** — AI-powered copilots, agents, RAG pipelines | `scan --target <url> --mode deep --repo ./src` | API probing + source code analysis |
|
|
119
|
+
| **Web Pentesting** — SQLi, XSS, SSRF, auth bypass, IDOR | `scan --target <url> --mode web` | Full autonomous web pentest, agents adapt per finding |
|
|
98
120
|
| **npm Packages** — Dependency supply chain, malicious code | `audit <package>` | Installs in sandbox, runs semgrep + AI code review |
|
|
99
121
|
| **Git Repositories** — Source-level security review | `review <path-or-url>` | Deep analysis with Claude Code, Codex, or Gemini CLI |
|
|
100
122
|
|
|
@@ -135,6 +157,9 @@ npx pwnkit-cli scan --target https://api.example.com/chat --runtime claude --mod
|
|
|
135
157
|
# MCP server audit
|
|
136
158
|
npx pwnkit-cli scan --target https://mcp-server.example.com --mode mcp --runtime claude
|
|
137
159
|
|
|
160
|
+
# Full web pentest (SQLi, XSS, SSRF, auth bypass, IDOR)
|
|
161
|
+
npx pwnkit-cli scan --target https://example.com --mode web --runtime claude
|
|
162
|
+
|
|
138
163
|
# Audit an npm package
|
|
139
164
|
npx pwnkit-cli audit react --depth deep --runtime claude
|
|
140
165
|
|
|
@@ -162,23 +187,25 @@ Combined with scan modes:
|
|
|
162
187
|
| `probe` | `--mode probe` | Send payloads to API, check responses (default) |
|
|
163
188
|
| `deep` | `--mode deep` | API probing + source code audit (requires `--repo`) |
|
|
164
189
|
| `mcp` | `--mode mcp` | Connect to MCP server, enumerate tools, test each for security issues |
|
|
190
|
+
| `web` | `--mode web` | Full web pentesting — SQLi, XSS, SSRF, auth bypass, IDOR |
|
|
165
191
|
|
|
166
|
-
> `deep` and `
|
|
192
|
+
> `deep`, `mcp`, and `web` modes require a process runtime (`claude`, `codex`, `gemini`, `opencode`, or `auto`).
|
|
167
193
|
|
|
168
194
|
## How It Compares
|
|
169
195
|
|
|
170
196
|
| Feature | pwnkit | promptfoo | garak | semgrep | nuclei |
|
|
171
197
|
|---------|--------|-----------|-------|---------|--------|
|
|
172
|
-
| **Agentic multi-turn pipeline** | Yes — Autonomous agents with tool use | No Single runner | No Single runner | No Rule-based | No Template runner |
|
|
198
|
+
| **Agentic multi-turn pipeline** | Yes — Autonomous agents with tool use | No — Single runner | No — Single runner | No — Rule-based | No — Template runner |
|
|
173
199
|
| **Verification (no false positives)** | Yes — Re-exploits to confirm | No | No | No | No |
|
|
174
200
|
| **LLM endpoint scanning** | Yes — Prompt injection, jailbreaks, exfil | Yes — Red-teaming | Yes — Probes | No | No |
|
|
201
|
+
| **Web pentesting (SQLi, XSS, SSRF, IDOR)** | Yes — `--mode web` | No | No | No | Partial — Templates only |
|
|
175
202
|
| **MCP server security** | Yes — Tool poisoning, schema abuse | No | No | No | No |
|
|
176
203
|
| **npm package audit** | Yes — Semgrep + AI review | No | No | Yes — Rules only | No |
|
|
177
204
|
| **Source code review** | Yes — AI-powered deep analysis | No | No | Yes — Rules only | No |
|
|
178
205
|
| **OWASP LLM Top 10** | Yes — 8/10 covered | Partial | Partial | N/A | N/A |
|
|
179
|
-
| **SARIF + GitHub Security tab** | Yes
|
|
206
|
+
| **SARIF + GitHub Security tab** | Yes | Yes | No | Yes | Yes |
|
|
180
207
|
| **One command, zero config** | Yes — `npx pwnkit-cli scan` | Needs YAML config | Needs Python setup | Needs rules config | Needs templates |
|
|
181
|
-
| **Open source** | Yes — MIT | Yes — (acquired by OpenAI) | Yes — | Yes — | Yes — |
|
|
208
|
+
| **Open source** | Yes — MIT | Yes — (acquired by OpenAI) | Yes — MIT | Yes — LGPL / Paid Pro | Yes — MIT |
|
|
182
209
|
| **Cost per scan** | $0.05–$1.00 | Varies | Free (local) | Free (OSS) / Paid (Pro) | Free |
|
|
183
210
|
|
|
184
211
|
pwnkit isn't replacing semgrep or nuclei — it covers the AI-specific attack surface they can't see. Use them together.
|
|
@@ -257,7 +284,7 @@ Finding lifecycle: `discovered → verified → confirmed → scored → reporte
|
|
|
257
284
|
|
|
258
285
|
## Roadmap
|
|
259
286
|
|
|
260
|
-
- [x] Core
|
|
287
|
+
- [x] Core autonomous agent pipeline (discover, attack, verify, report)
|
|
261
288
|
- [x] OWASP LLM Top 10 coverage (8/10)
|
|
262
289
|
- [x] SARIF output + GitHub Action
|
|
263
290
|
- [x] MCP server scanning
|
|
@@ -265,6 +292,7 @@ Finding lifecycle: `discovered → verified → confirmed → scored → reporte
|
|
|
265
292
|
- [x] Source code review (local + GitHub)
|
|
266
293
|
- [x] Multi-runtime support (Claude, Codex, Gemini, OpenCode)
|
|
267
294
|
- [x] Multi-turn agentic attacks (agents adapt payloads based on responses)
|
|
295
|
+
- [x] Web pentesting mode (SQLi, XSS, SSRF, auth bypass, IDOR)
|
|
268
296
|
- [ ] RAG pipeline security (poisoning, extraction)
|
|
269
297
|
- [ ] Agentic workflow testing (multi-tool chains)
|
|
270
298
|
- [ ] VS Code extension
|
|
@@ -275,7 +303,9 @@ Finding lifecycle: `discovered → verified → confirmed → scored → reporte
|
|
|
275
303
|
|
|
276
304
|
Created by a security researcher with [7 published CVEs](https://doruk.ch/blog) across node-forge, mysql2, uptime-kuma, liquidjs, picomatch, and jspdf.
|
|
277
305
|
|
|
278
|
-
pwnkit exists because
|
|
306
|
+
pwnkit is a general-purpose autonomous pentesting framework. It exists because modern attack surfaces — LLM endpoints, MCP servers, AI-powered web apps — require agents that adapt, not static rules that don't. You can't `nmap` a language model. You can't write a rule for a jailbreak that hasn't been invented yet. And traditional web scanners don't understand context — they miss IDOR in paginated APIs and SSRF buried in AI pipeline callbacks.
|
|
307
|
+
|
|
308
|
+
pwnkit uses autonomous agents that think like attackers, adapt their strategy mid-scan, and re-exploit every finding before reporting it. The result: real vulnerabilities, zero noise.
|
|
279
309
|
|
|
280
310
|
## Contributing
|
|
281
311
|
|
package/dist/index.js
CHANGED
|
@@ -10470,7 +10470,12 @@ var init_process = __esm({
|
|
|
10470
10470
|
return args;
|
|
10471
10471
|
}
|
|
10472
10472
|
case "codex":
|
|
10473
|
-
return [
|
|
10473
|
+
return [
|
|
10474
|
+
"exec",
|
|
10475
|
+
"--full-auto",
|
|
10476
|
+
"--skip-git-repo-check",
|
|
10477
|
+
prompt
|
|
10478
|
+
];
|
|
10474
10479
|
case "gemini":
|
|
10475
10480
|
return ["-p", prompt];
|
|
10476
10481
|
case "opencode":
|
|
@@ -13282,7 +13287,7 @@ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
|
13282
13287
|
var source_default = chalk;
|
|
13283
13288
|
|
|
13284
13289
|
// packages/shared/dist/constants.js
|
|
13285
|
-
var VERSION = "0.2.
|
|
13290
|
+
var VERSION = "0.2.2";
|
|
13286
13291
|
var DEPTH_CONFIG = {
|
|
13287
13292
|
quick: { maxTemplates: 5, maxPayloadsPerTemplate: 1, multiTurn: false },
|
|
13288
13293
|
default: { maxTemplates: 20, maxPayloadsPerTemplate: 3, multiTurn: false },
|
|
@@ -17878,6 +17883,18 @@ function createEventHandler(opts) {
|
|
|
17878
17883
|
|
|
17879
17884
|
// packages/cli/src/utils.ts
|
|
17880
17885
|
import { gzipSync } from "zlib";
|
|
17886
|
+
function checkRuntimeAvailability() {
|
|
17887
|
+
const hasApiKey = !!(process.env.OPENROUTER_API_KEY || process.env.ANTHROPIC_API_KEY || process.env.OPENAI_API_KEY);
|
|
17888
|
+
if (!hasApiKey) {
|
|
17889
|
+
console.log("");
|
|
17890
|
+
console.log(source_default.yellow(" Warning: No API key set. AI agent analysis will be skipped."));
|
|
17891
|
+
console.log(source_default.gray(" Set one of:"));
|
|
17892
|
+
console.log(source_default.gray(" export OPENROUTER_API_KEY=sk-or-..."));
|
|
17893
|
+
console.log(source_default.gray(" export ANTHROPIC_API_KEY=sk-ant-..."));
|
|
17894
|
+
console.log(source_default.gray(" export OPENAI_API_KEY=sk-..."));
|
|
17895
|
+
console.log("");
|
|
17896
|
+
}
|
|
17897
|
+
}
|
|
17881
17898
|
function buildShareUrl(report) {
|
|
17882
17899
|
const json = JSON.stringify(report);
|
|
17883
17900
|
const compressed = gzipSync(Buffer.from(json, "utf-8"));
|
|
@@ -18041,7 +18058,8 @@ function registerScanCommand(program3) {
|
|
|
18041
18058
|
baseHandler(event);
|
|
18042
18059
|
};
|
|
18043
18060
|
try {
|
|
18044
|
-
const
|
|
18061
|
+
const useAgentic = opts.agentic || mode === "web";
|
|
18062
|
+
const report = useAgentic ? await agenticScan({
|
|
18045
18063
|
config: scanConfig,
|
|
18046
18064
|
dbPath: opts.dbPath,
|
|
18047
18065
|
onEvent: eventHandler
|
|
@@ -18294,6 +18312,7 @@ function registerReviewCommand(program3) {
|
|
|
18294
18312
|
}
|
|
18295
18313
|
console.log("");
|
|
18296
18314
|
}
|
|
18315
|
+
if (format === "terminal") checkRuntimeAvailability();
|
|
18297
18316
|
const spinner = format === "terminal" ? createpwnkitSpinner("Initializing review...") : null;
|
|
18298
18317
|
const eventHandler = createEventHandler({ format, spinner });
|
|
18299
18318
|
try {
|
|
@@ -18381,6 +18400,7 @@ function registerAuditCommand(program3) {
|
|
|
18381
18400
|
}
|
|
18382
18401
|
console.log("");
|
|
18383
18402
|
}
|
|
18403
|
+
if (format === "terminal") checkRuntimeAvailability();
|
|
18384
18404
|
const spinner = format === "terminal" ? createpwnkitSpinner("Initializing audit...") : null;
|
|
18385
18405
|
const eventHandler = createEventHandler({ format, spinner });
|
|
18386
18406
|
try {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pwnkit-cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.2",
|
|
5
5
|
"description": "AI-powered agentic security scanner. Scan endpoints, audit packages, review source code. Autonomous agents discover, attack, verify, and report.",
|
|
6
6
|
"bin": {
|
|
7
7
|
"pwnkit": "dist/index.js"
|