mpx-scan 1.2.1 โ 1.3.1
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 +110 -147
- package/bin/cli.js +177 -19
- package/package.json +19 -15
- package/src/index.js +67 -1
- package/src/reporters/json.js +3 -1
- package/src/reporters/pdf.js +218 -0
- package/src/reporters/terminal.js +26 -0
- package/src/scanners/cookies.js +1 -1
- package/src/scanners/dns.js +27 -6
- package/src/scanners/exposed-files.js +1 -1
- package/src/scanners/fingerprint.js +1 -1
- package/src/scanners/headers.js +1 -1
- package/src/scanners/redirects.js +9 -9
- package/src/scanners/server.js +3 -3
- package/src/scanners/sri.js +1 -1
- package/src/schema.js +47 -0
- package/src/update.js +68 -0
package/README.md
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
# mpx-scan ๐
|
|
2
2
|
|
|
3
|
-
**Professional website security scanner for developers and AI agents
|
|
3
|
+
**Professional website security scanner for developers and AI agents.**
|
|
4
4
|
|
|
5
5
|
Check your site's security headers, SSL/TLS configuration, DNS settings, and get actionable fix suggestions โ all from your terminal.
|
|
6
6
|
|
|
7
7
|
Part of the [Mesaplex](https://mesaplex.com) developer toolchain.
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/mpx-scan)
|
|
10
|
-
[](LICENSE)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[](https://nodejs.org)
|
|
11
12
|
|
|
12
|
-
##
|
|
13
|
+
## Features
|
|
13
14
|
|
|
14
15
|
- **Zero-config security scanning** โ just point it at a URL
|
|
15
16
|
- **Beautiful terminal output** with color-coded results
|
|
16
17
|
- **Structured JSON output** โ `--json` for CI/CD and AI agent consumption
|
|
17
|
-
- **MCP server** โ integrates with any MCP-compatible AI agent (Claude,
|
|
18
|
+
- **MCP server** โ integrates with any MCP-compatible AI agent (Claude, Cursor, Windsurf, etc.)
|
|
18
19
|
- **Actionable fix suggestions** โ copy-paste config for nginx, Apache, Caddy, Cloudflare
|
|
19
20
|
- **Batch scanning** โ pipe URLs from stdin
|
|
20
21
|
- **Self-documenting** โ `--schema` returns machine-readable tool description
|
|
21
|
-
- **Fast** โ scans complete in seconds
|
|
22
22
|
- **Zero native dependencies** โ installs cleanly everywhere
|
|
23
|
-
- **CI/CD ready** โ predictable exit codes and JSON output
|
|
24
23
|
|
|
25
24
|
### Security Checks
|
|
26
25
|
|
|
@@ -30,23 +29,42 @@ Part of the [Mesaplex](https://mesaplex.com) developer toolchain.
|
|
|
30
29
|
- โ
Server information leakage
|
|
31
30
|
- โ
CORS misconfiguration
|
|
32
31
|
- โ
Mixed content detection
|
|
33
|
-
- โ
DNS security (DNSSEC, CAA records) โ *Pro
|
|
34
|
-
- โ
Subresource Integrity (SRI) โ *Pro
|
|
35
|
-
- โ
Open redirect detection โ *Pro
|
|
36
|
-
- โ
Exposed sensitive files โ *Pro
|
|
32
|
+
- โ
DNS security (DNSSEC, CAA records) โ *Pro*
|
|
33
|
+
- โ
Subresource Integrity (SRI) โ *Pro*
|
|
34
|
+
- โ
Open redirect detection โ *Pro*
|
|
35
|
+
- โ
Exposed sensitive files โ *Pro*
|
|
37
36
|
|
|
38
|
-
##
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g mpx-scan
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or run directly with npx:
|
|
39
44
|
|
|
40
45
|
```bash
|
|
41
|
-
# Run once without installing
|
|
42
46
|
npx mpx-scan https://example.com
|
|
47
|
+
```
|
|
43
48
|
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
**Requirements:** Node.js 18+ ยท No native dependencies ยท macOS, Linux, Windows
|
|
50
|
+
|
|
51
|
+
## Quick Start
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Basic scan
|
|
46
55
|
mpx-scan https://example.com
|
|
56
|
+
|
|
57
|
+
# JSON output
|
|
58
|
+
mpx-scan https://example.com --json
|
|
59
|
+
|
|
60
|
+
# Fix suggestions for nginx
|
|
61
|
+
mpx-scan https://example.com --fix nginx
|
|
62
|
+
|
|
63
|
+
# Deep scan (Pro)
|
|
64
|
+
mpx-scan https://example.com --full
|
|
47
65
|
```
|
|
48
66
|
|
|
49
|
-
##
|
|
67
|
+
## Usage
|
|
50
68
|
|
|
51
69
|
### Basic Scan
|
|
52
70
|
|
|
@@ -65,7 +83,7 @@ Returns structured JSON to stdout (progress/status goes to stderr):
|
|
|
65
83
|
```json
|
|
66
84
|
{
|
|
67
85
|
"mpxScan": {
|
|
68
|
-
"version": "1.
|
|
86
|
+
"version": "1.3.0",
|
|
69
87
|
"scannedAt": "2026-02-16T22:00:00.000Z",
|
|
70
88
|
"scanDuration": 350
|
|
71
89
|
},
|
|
@@ -90,7 +108,7 @@ Returns structured JSON to stdout (progress/status goes to stderr):
|
|
|
90
108
|
}
|
|
91
109
|
```
|
|
92
110
|
|
|
93
|
-
###
|
|
111
|
+
### Fix Suggestions
|
|
94
112
|
|
|
95
113
|
```bash
|
|
96
114
|
mpx-scan https://example.com --fix nginx
|
|
@@ -99,18 +117,27 @@ mpx-scan https://example.com --fix caddy
|
|
|
99
117
|
mpx-scan https://example.com --fix cloudflare
|
|
100
118
|
```
|
|
101
119
|
|
|
102
|
-
###
|
|
120
|
+
### Brief Output
|
|
103
121
|
|
|
104
122
|
```bash
|
|
105
|
-
mpx-scan https://example.com --
|
|
123
|
+
mpx-scan https://example.com --brief
|
|
106
124
|
```
|
|
107
125
|
|
|
108
|
-
###
|
|
126
|
+
### PDF Export
|
|
109
127
|
|
|
110
128
|
```bash
|
|
111
|
-
|
|
129
|
+
# Generate PDF report (auto-named)
|
|
130
|
+
mpx-scan https://example.com --pdf
|
|
131
|
+
|
|
132
|
+
# Specify output filename
|
|
133
|
+
mpx-scan https://example.com --pdf report.pdf
|
|
134
|
+
|
|
135
|
+
# Combine with JSON output
|
|
136
|
+
mpx-scan https://example.com --json --pdf report.pdf
|
|
112
137
|
```
|
|
113
138
|
|
|
139
|
+
Generates a professional PDF report with color-coded findings, severity grades, and actionable recommendations.
|
|
140
|
+
|
|
114
141
|
### Batch Scanning
|
|
115
142
|
|
|
116
143
|
```bash
|
|
@@ -127,7 +154,38 @@ mpx-scan --schema
|
|
|
127
154
|
|
|
128
155
|
Returns a JSON schema describing all commands, flags, inputs, and outputs โ designed for AI agent tool discovery.
|
|
129
156
|
|
|
130
|
-
|
|
157
|
+
### CLI Reference
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
Usage: mpx-scan [url] [options]
|
|
161
|
+
|
|
162
|
+
Arguments:
|
|
163
|
+
url URL to scan
|
|
164
|
+
|
|
165
|
+
Options:
|
|
166
|
+
-V, --version Output version number
|
|
167
|
+
--json Output as structured JSON
|
|
168
|
+
--full Run all checks (Pro only)
|
|
169
|
+
--brief Brief one-line output
|
|
170
|
+
--quiet, -q Minimal output (no banners)
|
|
171
|
+
--no-color Disable ANSI color codes
|
|
172
|
+
--batch Read URLs from stdin (one per line)
|
|
173
|
+
--schema Output JSON schema for tool discovery
|
|
174
|
+
--pdf [filename] Export results as a PDF report
|
|
175
|
+
--fix <platform> Generate fix config (nginx, apache, caddy, cloudflare)
|
|
176
|
+
--timeout <seconds> Connection timeout (default: 10)
|
|
177
|
+
--ci CI mode: exit 1 if below --min-score
|
|
178
|
+
--min-score <score> Minimum score for CI mode (default: 70)
|
|
179
|
+
-h, --help Display help
|
|
180
|
+
|
|
181
|
+
Commands:
|
|
182
|
+
license Show license status
|
|
183
|
+
activate <key> Activate Pro license
|
|
184
|
+
deactivate Return to free tier
|
|
185
|
+
mcp Start MCP stdio server
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## AI Agent Usage
|
|
131
189
|
|
|
132
190
|
mpx-scan is designed to be used by AI agents as well as humans.
|
|
133
191
|
|
|
@@ -151,36 +209,16 @@ The MCP server exposes these tools:
|
|
|
151
209
|
- **`generate_fixes`** โ Scan and generate platform-specific fix config
|
|
152
210
|
- **`get_schema`** โ Get full tool schema
|
|
153
211
|
|
|
154
|
-
### Programmatic Usage
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
# JSON output for parsing
|
|
158
|
-
mpx-scan https://example.com --json
|
|
159
|
-
|
|
160
|
-
# Batch processing
|
|
161
|
-
cat urls.txt | mpx-scan --batch --json
|
|
162
|
-
|
|
163
|
-
# Schema discovery
|
|
164
|
-
mpx-scan --schema
|
|
165
|
-
|
|
166
|
-
# Quiet mode (no banners, progress goes to stderr)
|
|
167
|
-
mpx-scan https://example.com --json --quiet
|
|
168
|
-
```
|
|
169
|
-
|
|
170
212
|
### Exit Codes
|
|
171
213
|
|
|
172
214
|
| Code | Meaning |
|
|
173
215
|
|------|---------|
|
|
174
|
-
| 0 |
|
|
175
|
-
| 1 |
|
|
176
|
-
| 2 | Invalid arguments |
|
|
177
|
-
| 3 | Configuration error (license, rate limit) |
|
|
178
|
-
| 4 | Network/connectivity error |
|
|
216
|
+
| 0 | Success, no issues found |
|
|
217
|
+
| 1 | Issues found or error |
|
|
218
|
+
| 2 | Invalid usage or bad arguments |
|
|
179
219
|
|
|
180
220
|
### Error Responses (JSON mode)
|
|
181
221
|
|
|
182
|
-
When `--json` is used, errors return structured JSON:
|
|
183
|
-
|
|
184
222
|
```json
|
|
185
223
|
{
|
|
186
224
|
"error": "Description of what went wrong",
|
|
@@ -193,14 +231,11 @@ Error codes: `ERR_NETWORK`, `ERR_SCAN`, `ERR_RATE_LIMIT`, `ERR_PRO_REQUIRED`, `E
|
|
|
193
231
|
### Automation Tips
|
|
194
232
|
|
|
195
233
|
- Use `--json` for machine-parseable output (stdout only, no ANSI)
|
|
196
|
-
- Use `--no-color` to strip ANSI codes from human-readable output
|
|
197
234
|
- Use `--quiet` to suppress banners and progress info
|
|
198
|
-
-
|
|
235
|
+
- Use `--batch --json` for JSONL processing
|
|
199
236
|
- Check exit codes for pass/fail decisions in CI/CD
|
|
200
237
|
|
|
201
|
-
##
|
|
202
|
-
|
|
203
|
-
### CI/CD Integration
|
|
238
|
+
## CI/CD Integration
|
|
204
239
|
|
|
205
240
|
```yaml
|
|
206
241
|
# .github/workflows/security.yml
|
|
@@ -213,38 +248,25 @@ jobs:
|
|
|
213
248
|
- run: npx mpx-scan https://mysite.com --ci --min-score 70 --json
|
|
214
249
|
```
|
|
215
250
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
```bash
|
|
219
|
-
#!/bin/bash
|
|
220
|
-
for site in site1.com site2.com site3.com; do
|
|
221
|
-
result=$(npx mpx-scan "$site" --json 2>/dev/null)
|
|
222
|
-
grade=$(echo "$result" | jq -r '.score.grade')
|
|
223
|
-
echo "$site: $grade"
|
|
224
|
-
done
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
## ๐ Free vs Pro
|
|
251
|
+
## Free vs Pro
|
|
228
252
|
|
|
229
253
|
| Feature | Free | Pro |
|
|
230
254
|
|---------|------|-----|
|
|
231
|
-
|
|
|
232
|
-
|
|
|
233
|
-
|
|
|
234
|
-
|
|
|
235
|
-
|
|
|
236
|
-
|
|
|
237
|
-
|
|
|
238
|
-
|
|
|
239
|
-
|
|
|
240
|
-
|
|
|
241
|
-
|
|
|
242
|
-
|
|
|
243
|
-
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
## ๐ License Management
|
|
255
|
+
| Daily scans | 3 | Unlimited |
|
|
256
|
+
| Security headers | โ
| โ
|
|
|
257
|
+
| SSL/TLS checks | โ
| โ
|
|
|
258
|
+
| Server info checks | โ
| โ
|
|
|
259
|
+
| JSON output | โ
| โ
|
|
|
260
|
+
| Batch scanning | โ
| โ
|
|
|
261
|
+
| MCP server | โ
| โ
|
|
|
262
|
+
| DNS security | โ | โ
|
|
|
263
|
+
| Cookie security | โ | โ
|
|
|
264
|
+
| SRI checks | โ | โ
|
|
|
265
|
+
| Exposed files | โ | โ
|
|
|
266
|
+
| Mixed content | โ | โ
|
|
|
267
|
+
| Full scan (`--full`) | โ | โ
|
|
|
268
|
+
|
|
269
|
+
### License Management
|
|
248
270
|
|
|
249
271
|
```bash
|
|
250
272
|
mpx-scan license # Check status
|
|
@@ -252,83 +274,24 @@ mpx-scan activate MPX-PRO-XXXXXXXX # Activate Pro
|
|
|
252
274
|
mpx-scan deactivate # Return to free tier
|
|
253
275
|
```
|
|
254
276
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
```
|
|
258
|
-
Usage: mpx-scan [url] [options]
|
|
259
|
-
|
|
260
|
-
Arguments:
|
|
261
|
-
url URL to scan
|
|
262
|
-
|
|
263
|
-
Options:
|
|
264
|
-
-V, --version Output version number
|
|
265
|
-
--json Output as structured JSON
|
|
266
|
-
--full Run all checks (Pro only)
|
|
267
|
-
--brief Brief one-line output
|
|
268
|
-
--quiet, -q Minimal output (no banners)
|
|
269
|
-
--no-color Disable ANSI color codes
|
|
270
|
-
--batch Read URLs from stdin (one per line)
|
|
271
|
-
--schema Output JSON schema for tool discovery
|
|
272
|
-
--fix <platform> Generate fix config (nginx, apache, caddy, cloudflare)
|
|
273
|
-
--timeout <seconds> Connection timeout (default: 10)
|
|
274
|
-
--ci CI mode: exit 1 if below --min-score
|
|
275
|
-
--min-score <score> Minimum score for CI mode (default: 70)
|
|
276
|
-
-h, --help Display help
|
|
277
|
-
|
|
278
|
-
Commands:
|
|
279
|
-
license Show license status
|
|
280
|
-
activate <key> Activate Pro license
|
|
281
|
-
deactivate Return to free tier
|
|
282
|
-
mcp Start MCP stdio server
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
## ๐ฆ Installation
|
|
286
|
-
|
|
287
|
-
```bash
|
|
288
|
-
# Global
|
|
289
|
-
npm install -g mpx-scan
|
|
290
|
-
|
|
291
|
-
# Project dependency
|
|
292
|
-
npm install --save-dev mpx-scan
|
|
293
|
-
|
|
294
|
-
# One-off with npx
|
|
295
|
-
npx mpx-scan https://example.com
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
### Requirements
|
|
299
|
-
|
|
300
|
-
- Node.js 18.0.0 or higher
|
|
301
|
-
- No native dependencies
|
|
302
|
-
- Works on macOS, Linux, Windows
|
|
303
|
-
|
|
304
|
-
## ๐งช Testing
|
|
305
|
-
|
|
306
|
-
```bash
|
|
307
|
-
npm test
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
## ๐ค Contributing
|
|
311
|
-
|
|
312
|
-
Security improvements and bug fixes are welcome!
|
|
313
|
-
|
|
314
|
-
## ๐ License
|
|
277
|
+
**Upgrade to Pro:** [https://mesaplex.com/mpx-scan](https://mesaplex.com/mpx-scan)
|
|
315
278
|
|
|
316
|
-
|
|
279
|
+
## License
|
|
317
280
|
|
|
318
|
-
See [LICENSE](LICENSE) for full terms.
|
|
281
|
+
Dual License โ Free tier for personal use, Pro license for commercial use and advanced features. See [LICENSE](LICENSE) for full terms.
|
|
319
282
|
|
|
320
|
-
##
|
|
283
|
+
## Links
|
|
321
284
|
|
|
322
|
-
- **Website:** [https://mesaplex.com
|
|
285
|
+
- **Website:** [https://mesaplex.com](https://mesaplex.com)
|
|
323
286
|
- **npm:** [https://www.npmjs.com/package/mpx-scan](https://www.npmjs.com/package/mpx-scan)
|
|
324
287
|
- **GitHub:** [https://github.com/mesaplexdev/mpx-scan](https://github.com/mesaplexdev/mpx-scan)
|
|
325
288
|
- **Support:** support@mesaplex.com
|
|
326
289
|
|
|
327
|
-
|
|
290
|
+
### Related Tools
|
|
328
291
|
|
|
329
|
-
- **mpx-
|
|
330
|
-
- **[mpx-
|
|
331
|
-
- **[mpx-
|
|
292
|
+
- **[mpx-api](https://www.npmjs.com/package/mpx-api)** โ API testing, mocking, and documentation
|
|
293
|
+
- **[mpx-db](https://www.npmjs.com/package/mpx-db)** โ Database management CLI
|
|
294
|
+
- **[mpx-secrets-audit](https://www.npmjs.com/package/mpx-secrets-audit)** โ Secret lifecycle tracking and audit
|
|
332
295
|
|
|
333
296
|
---
|
|
334
297
|
|