hackmyagent-core 0.4.2 → 0.4.3
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 +11 -9
- package/dist/hardening/scanner.d.ts +1 -1
- package/dist/hardening/scanner.d.ts.map +1 -1
- package/dist/hardening/scanner.js +60 -2
- package/dist/hardening/scanner.js.map +1 -1
- package/dist/hardening/scanner.test.js +48 -0
- package/dist/hardening/scanner.test.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,16 +7,18 @@
|
|
|
7
7
|
|
|
8
8
|
**Website:** [hackmyagent.com](https://hackmyagent.com) — Scan external infrastructure for exposed MCP endpoints, configs, and credentials
|
|
9
9
|
|
|
10
|
-
## What's New — v0.4.
|
|
10
|
+
## What's New — v0.4.3
|
|
11
11
|
|
|
12
12
|
**First scanner for [CVE-2026-25253](https://hackmyagent.com/blog/cve-2026-25253-detection)** (CVSS 8.8) — the OpenClaw WebSocket hijacking RCE.
|
|
13
13
|
|
|
14
14
|
- **CVE-001:** Detect vulnerable OpenClaw versions (before v2026.1.29)
|
|
15
15
|
- **CVE-002:** Control UI origin restrictions (defense-in-depth hardening)
|
|
16
|
+
- **CVE-003:** CVE-2026-25157 — OS command injection via SSH path (CVSS 7.8)
|
|
17
|
+
- **CVE-004:** CVE-2026-24763 — Docker PATH command injection (CVSS 8.8)
|
|
16
18
|
- **SUPPLY-005–008:** ClawHavoc campaign IOCs (C2 IPs, malware filenames, ClickFix patterns)
|
|
17
19
|
- **GATEWAY-007–008, CONFIG-007–009:** Config hardening (open DM wildcards, disabled sandbox, weak tokens)
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
13 new checks. 147+ total.
|
|
20
22
|
|
|
21
23
|
## Disclaimer
|
|
22
24
|
|
|
@@ -24,7 +26,7 @@ HackMyAgent performs passive reconnaissance only (port checks and HTTP requests)
|
|
|
24
26
|
|
|
25
27
|
```bash
|
|
26
28
|
npx hackmyagent check @publisher/skill # verify a skill before installing
|
|
27
|
-
npx hackmyagent secure # harden your agent setup (
|
|
29
|
+
npx hackmyagent secure # harden your agent setup (147+ checks)
|
|
28
30
|
npx hackmyagent secure --fix # auto-fix security issues
|
|
29
31
|
npx hackmyagent scan example.com # scan for exposed infrastructure
|
|
30
32
|
npx hackmyagent attack --local # red team with 55 attack payloads
|
|
@@ -43,7 +45,7 @@ npx hackmyagent secure --benchmark oasb-1 # run OASB-1 security benchmark
|
|
|
43
45
|
CVE-2026-25253 turned every OpenClaw installation into a remote code execution target. 341 malicious skills were distributed through ClawHub. AI agent security is no longer theoretical — HackMyAgent helps you:
|
|
44
46
|
|
|
45
47
|
- **Check** skills before installing (publisher verification, permission analysis)
|
|
46
|
-
- **Secure** your agent setup (
|
|
48
|
+
- **Secure** your agent setup (147+ security checks with auto-remediation)
|
|
47
49
|
- **Scan** external infrastructure (exposed MCP endpoints, leaked configs)
|
|
48
50
|
|
|
49
51
|
## Installation
|
|
@@ -63,7 +65,7 @@ npm install --save-dev hackmyagent
|
|
|
63
65
|
|
|
64
66
|
### `hackmyagent secure`
|
|
65
67
|
|
|
66
|
-
Scan and harden your local agent setup with
|
|
68
|
+
Scan and harden your local agent setup with 147+ security checks across 31 categories.
|
|
67
69
|
|
|
68
70
|
```bash
|
|
69
71
|
# Basic scan
|
|
@@ -116,7 +118,7 @@ hackmyagent secure --verbose
|
|
|
116
118
|
| API | 4 | API security |
|
|
117
119
|
| VSCODE | 4 | VS Code configuration |
|
|
118
120
|
| CURSOR | 4 | Cursor IDE configuration |
|
|
119
|
-
| CVE |
|
|
121
|
+
| CVE | 4 | OpenClaw CVE detection |
|
|
120
122
|
| GATEWAY | 8 | Gateway misconfigurations |
|
|
121
123
|
| CONFIG | 9 | Insecure settings |
|
|
122
124
|
| SUPPLY | 8 | Supply chain attacks |
|
|
@@ -329,7 +331,7 @@ hackmyagent secure -b oasb-1 --fail-below 70
|
|
|
329
331
|
|
|
330
332
|
### `hackmyagent secure-openclaw`
|
|
331
333
|
|
|
332
|
-
Scan OpenClaw/Moltbot installations with
|
|
334
|
+
Scan OpenClaw/Moltbot installations with 47 specialized security checks and auto-remediation.
|
|
333
335
|
|
|
334
336
|
```bash
|
|
335
337
|
hackmyagent secure-openclaw # scan default location
|
|
@@ -367,7 +369,7 @@ hackmyagent secure-openclaw --json # JSON output for CI/CD
|
|
|
367
369
|
| GATEWAY | 8 | Gateway misconfigurations (4 auto-fixable) |
|
|
368
370
|
| CONFIG | 9 | Insecure settings |
|
|
369
371
|
| SUPPLY | 8 | Supply chain attacks |
|
|
370
|
-
| CVE |
|
|
372
|
+
| CVE | 4 | OpenClaw CVE detection |
|
|
371
373
|
|
|
372
374
|
See [SECURITY_CHECKS.md](docs/SECURITY_CHECKS.md#openclaw-security-checks) for full documentation.
|
|
373
375
|
|
|
@@ -462,7 +464,7 @@ hackmyagent secure --json | jq '.findings[] | select(.severity == "critical")'
|
|
|
462
464
|
|
|
463
465
|
## Security Check Reference
|
|
464
466
|
|
|
465
|
-
For the complete list of
|
|
467
|
+
For the complete list of 147+ security checks with descriptions and remediation guidance, see [SECURITY_CHECKS.md](docs/SECURITY_CHECKS.md).
|
|
466
468
|
|
|
467
469
|
## Auto-Fix Capabilities
|
|
468
470
|
|
|
@@ -136,7 +136,7 @@ export declare class HardeningScanner {
|
|
|
136
136
|
*/
|
|
137
137
|
private checkOpenclawSupplyChain;
|
|
138
138
|
/**
|
|
139
|
-
* OpenClaw CVE-specific checks (CVE-001, CVE-002)
|
|
139
|
+
* OpenClaw CVE-specific checks (CVE-001, CVE-002, CVE-003, CVE-004)
|
|
140
140
|
*/
|
|
141
141
|
private checkOpenclawCVE;
|
|
142
142
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../src/hardening/scanner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,UAAU,EAA0C,MAAM,kBAAkB,CAAC;AAyD3F,MAAM,WA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AwB;YAmExB,wBAAwB;YAqHxB,oBAAoB;YA+GpB,uBAAuB;YA8HvB,iBAAiB;YA8GjB,oBAAoB;YAuGpB,mBAAmB;YAiGnB,gBAAgB;YAmIhB,oBAAoB;YAoIpB,gBAAgB;YAyHhB,qBAAqB;YA+GrB,eAAe;IAiI7B;;OAEG;YACW,mBAAmB;IA8GjC;;OAEG;YACW,oBAAoB;IAiKlC;;OAEG;YACW,iBAAiB;IA4I/B;;OAEG;YACW,oBAAoB;IAwIlC;;OAEG;YACW,eAAe;IAqJ7B;;OAEG;YACW,eAAe;IAuI7B;;OAEG;YACW,eAAe;IAyG7B;;OAEG;YACW,mBAAmB;IAmHjC,OAAO,CAAC,cAAc;IAsBtB;;OAEG;YACW,YAAY;IAkD1B;;OAEG;IACG,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA6DhD;;;OAGG;YACW,cAAc;IAgD5B;;OAEG;YACW,mBAAmB;IAoUjC;;;OAGG;YACW,kBAAkB;IAgDhC;;OAEG;YACW,sBAAsB;IA2LpC;;OAEG;YACW,sBAAsB;IA+BpC;;OAEG;YACW,oBAAoB;IAqVlC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA4B3B;;OAEG;YACW,iBAAiB;IA8D/B;;OAEG;YACW,mBAAmB;IA6VjC;;OAEG;YACW,wBAAwB;IA4OtC;;OAEG;YACW,gBAAgB;CA4J/B"}
|
|
@@ -5227,7 +5227,7 @@ dist/
|
|
|
5227
5227
|
return findings;
|
|
5228
5228
|
}
|
|
5229
5229
|
/**
|
|
5230
|
-
* OpenClaw CVE-specific checks (CVE-001, CVE-002)
|
|
5230
|
+
* OpenClaw CVE-specific checks (CVE-001, CVE-002, CVE-003, CVE-004)
|
|
5231
5231
|
*/
|
|
5232
5232
|
async checkOpenclawCVE(targetDir, _autoFix) {
|
|
5233
5233
|
const findings = [];
|
|
@@ -5263,11 +5263,69 @@ dist/
|
|
|
5263
5263
|
fixable: false,
|
|
5264
5264
|
fix: 'Upgrade openclaw to v2026.1.29 or later: npm install openclaw@latest',
|
|
5265
5265
|
});
|
|
5266
|
+
// CVE-003: OS Command Injection via SSH Path (same fix version)
|
|
5267
|
+
if (isVulnerable) {
|
|
5268
|
+
findings.push({
|
|
5269
|
+
checkId: 'CVE-003',
|
|
5270
|
+
name: 'CVE-2026-25157: OS Command Injection via SSH Path',
|
|
5271
|
+
description: 'OpenClaw version vulnerable to CVE-2026-25157 (CVSS 7.8) - unescaped project path enables command injection on SSH hosts',
|
|
5272
|
+
category: 'cve',
|
|
5273
|
+
severity: 'high',
|
|
5274
|
+
passed: false,
|
|
5275
|
+
message: `OpenClaw ${openclawVersion} is vulnerable to CVE-2026-25157 - upgrade to v2026.1.29+`,
|
|
5276
|
+
file: 'package.json',
|
|
5277
|
+
fixable: false,
|
|
5278
|
+
fix: 'Upgrade openclaw to v2026.1.29 or later: npm install openclaw@latest',
|
|
5279
|
+
});
|
|
5280
|
+
}
|
|
5281
|
+
else {
|
|
5282
|
+
findings.push({
|
|
5283
|
+
checkId: 'CVE-003',
|
|
5284
|
+
name: 'CVE-2026-25157: OS Command Injection via SSH Path',
|
|
5285
|
+
description: 'OpenClaw version includes CVE-2026-25157 fix',
|
|
5286
|
+
category: 'cve',
|
|
5287
|
+
severity: 'high',
|
|
5288
|
+
passed: true,
|
|
5289
|
+
message: `OpenClaw ${openclawVersion} includes CVE-2026-25157 fix`,
|
|
5290
|
+
file: 'package.json',
|
|
5291
|
+
fixable: false,
|
|
5292
|
+
fix: 'No action needed',
|
|
5293
|
+
});
|
|
5294
|
+
}
|
|
5295
|
+
// CVE-004: Docker PATH Command Injection (same fix version)
|
|
5296
|
+
if (isVulnerable) {
|
|
5297
|
+
findings.push({
|
|
5298
|
+
checkId: 'CVE-004',
|
|
5299
|
+
name: 'CVE-2026-24763: Docker PATH Command Injection',
|
|
5300
|
+
description: 'OpenClaw version vulnerable to CVE-2026-24763 (CVSS 8.8) - unsafe PATH handling enables command injection in Docker sandbox',
|
|
5301
|
+
category: 'cve',
|
|
5302
|
+
severity: 'critical',
|
|
5303
|
+
passed: false,
|
|
5304
|
+
message: `OpenClaw ${openclawVersion} is vulnerable to CVE-2026-24763 - upgrade to v2026.1.29+`,
|
|
5305
|
+
file: 'package.json',
|
|
5306
|
+
fixable: false,
|
|
5307
|
+
fix: 'Upgrade openclaw to v2026.1.29 or later: npm install openclaw@latest',
|
|
5308
|
+
});
|
|
5309
|
+
}
|
|
5310
|
+
else {
|
|
5311
|
+
findings.push({
|
|
5312
|
+
checkId: 'CVE-004',
|
|
5313
|
+
name: 'CVE-2026-24763: Docker PATH Command Injection',
|
|
5314
|
+
description: 'OpenClaw version includes CVE-2026-24763 fix',
|
|
5315
|
+
category: 'cve',
|
|
5316
|
+
severity: 'critical',
|
|
5317
|
+
passed: true,
|
|
5318
|
+
message: `OpenClaw ${openclawVersion} includes CVE-2026-24763 fix`,
|
|
5319
|
+
file: 'package.json',
|
|
5320
|
+
fixable: false,
|
|
5321
|
+
fix: 'No action needed',
|
|
5322
|
+
});
|
|
5323
|
+
}
|
|
5266
5324
|
}
|
|
5267
5325
|
}
|
|
5268
5326
|
}
|
|
5269
5327
|
catch {
|
|
5270
|
-
// No package.json or parse error - skip CVE
|
|
5328
|
+
// No package.json or parse error - skip CVE checks
|
|
5271
5329
|
}
|
|
5272
5330
|
// CVE-002: Control UI Origin Restrictions (defense-in-depth)
|
|
5273
5331
|
const configFiles = await this.findGatewayConfigFiles(targetDir);
|