hackmyagent 0.2.2 → 0.2.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 +65 -6
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
# HackMyAgent
|
|
2
|
-
|
|
3
|
-
> **AI Agent Security Scanner** — Detect exposed MCP servers, leaked API keys, and vulnerable Claude Code configurations. Free, no signup required.
|
|
1
|
+
# HackMyAgent CLI
|
|
4
2
|
|
|
5
3
|
[](https://www.npmjs.com/package/hackmyagent)
|
|
6
4
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
7
5
|
|
|
6
|
+
**Part of [OpenA2A](https://opena2a.org)** — open-source security for AI agents
|
|
7
|
+
|
|
8
8
|
**Website:** [hackmyagent.com](https://hackmyagent.com) — Scan external infrastructure for exposed MCP endpoints, configs, and credentials
|
|
9
9
|
|
|
10
|
+
## Disclaimer
|
|
11
|
+
|
|
12
|
+
HackMyAgent performs passive reconnaissance only (port checks and HTTP requests) — it does not exploit vulnerabilities. However, please only scan systems you own or have permission to test. The authors assume no liability for misuse of this tool.
|
|
13
|
+
|
|
10
14
|
```bash
|
|
11
15
|
npx hackmyagent check @publisher/skill # verify a skill before installing
|
|
12
16
|
npx hackmyagent secure # harden your agent setup (100 checks)
|
|
@@ -26,7 +30,7 @@ npx hackmyagent scan example.com # scan for exposed infrastructure
|
|
|
26
30
|
AI agents are powerful but introduce new attack surfaces. Skills can be malicious. Configs can leak secrets. MCP servers can be exposed. HackMyAgent helps you:
|
|
27
31
|
|
|
28
32
|
- **Check** skills before installing (publisher verification, permission analysis)
|
|
29
|
-
- **Secure** your agent setup (100-point CIS
|
|
33
|
+
- **Secure** your agent setup (100-point CIS security scan, auto-remediation)
|
|
30
34
|
- **Scan** external infrastructure (exposed MCP endpoints, leaked configs)
|
|
31
35
|
|
|
32
36
|
## Installation
|
|
@@ -108,6 +112,8 @@ hackmyagent check @publisher/skill --offline # skip DNS verification
|
|
|
108
112
|
- Permissions requested (filesystem, network, shell access)
|
|
109
113
|
- Revocation status against global blocklist
|
|
110
114
|
|
|
115
|
+
**Note:** Only scan systems you own or have permission to test.
|
|
116
|
+
|
|
111
117
|
**Risk Levels:** `low`, `medium`, `high`, `critical`
|
|
112
118
|
|
|
113
119
|
### `hackmyagent scan`
|
|
@@ -129,6 +135,46 @@ hackmyagent scan example.com --json
|
|
|
129
135
|
|
|
130
136
|
**Scoring:** A (90-100), B (80-89), C (70-79), D (60-69), F (<60)
|
|
131
137
|
|
|
138
|
+
### `hackmyagent secure-openclaw`
|
|
139
|
+
|
|
140
|
+
Scan OpenClaw/Moltbot installations with 34 specialized security checks and auto-remediation.
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
hackmyagent secure-openclaw # scan default location
|
|
144
|
+
hackmyagent secure-openclaw ~/.moltbot # scan specific directory
|
|
145
|
+
hackmyagent secure-openclaw --fix # auto-fix gateway misconfigurations
|
|
146
|
+
hackmyagent secure-openclaw --fix --dry-run # preview fixes
|
|
147
|
+
hackmyagent secure-openclaw --json # JSON output for CI/CD
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Detects:**
|
|
151
|
+
- Unsigned/malicious skills (ClawHavoc campaign patterns)
|
|
152
|
+
- ClickFix social engineering attacks
|
|
153
|
+
- Reverse shell backdoors
|
|
154
|
+
- Credential exfiltration (wallets, SSH keys, API keys)
|
|
155
|
+
- Heartbeat/cron abuse
|
|
156
|
+
- Gateway misconfigurations (GHSA-g8p2 vulnerability)
|
|
157
|
+
- Disabled sandbox/approval confirmations
|
|
158
|
+
|
|
159
|
+
**Auto-Fix (with `--fix`):**
|
|
160
|
+
| Check | Before | After |
|
|
161
|
+
|-------|--------|-------|
|
|
162
|
+
| GATEWAY-001 | `0.0.0.0` | `127.0.0.1` (local-only) |
|
|
163
|
+
| GATEWAY-003 | Plaintext token | `${OPENCLAW_AUTH_TOKEN}` env var |
|
|
164
|
+
| GATEWAY-004 | Approvals disabled | Approvals enabled |
|
|
165
|
+
| GATEWAY-005 | Sandbox disabled | Sandbox enabled |
|
|
166
|
+
|
|
167
|
+
**Check Categories:**
|
|
168
|
+
| Category | Checks | Description |
|
|
169
|
+
|----------|--------|-------------|
|
|
170
|
+
| SKILL | 12 | Malicious skill detection |
|
|
171
|
+
| HEARTBEAT | 6 | Heartbeat/cron abuse |
|
|
172
|
+
| GATEWAY | 6 | Gateway misconfigurations (4 auto-fixable) |
|
|
173
|
+
| CONFIG | 6 | Insecure settings |
|
|
174
|
+
| SUPPLY | 4 | Supply chain attacks |
|
|
175
|
+
|
|
176
|
+
See [SECURITY_CHECKS.md](docs/SECURITY_CHECKS.md#openclaw-security-checks) for full documentation.
|
|
177
|
+
|
|
132
178
|
### `hackmyagent rollback`
|
|
133
179
|
|
|
134
180
|
Undo auto-fix changes.
|
|
@@ -194,6 +240,7 @@ For the complete list of 100 security checks with descriptions and remediation g
|
|
|
194
240
|
|
|
195
241
|
The following issues can be automatically fixed with `--fix`:
|
|
196
242
|
|
|
243
|
+
**General (`hackmyagent secure --fix`):**
|
|
197
244
|
| Check ID | Issue | Auto-Fix Action |
|
|
198
245
|
|----------|-------|-----------------|
|
|
199
246
|
| CRED-001 | Exposed API keys | Replace with env var reference |
|
|
@@ -203,7 +250,15 @@ The following issues can be automatically fixed with `--fix`:
|
|
|
203
250
|
| MCP-001 | Root filesystem access | Scope to project directory |
|
|
204
251
|
| NET-001 | Bound to 0.0.0.0 | Bind to 127.0.0.1 |
|
|
205
252
|
|
|
206
|
-
|
|
253
|
+
**OpenClaw (`hackmyagent secure-openclaw --fix`):**
|
|
254
|
+
| Check ID | Issue | Auto-Fix Action |
|
|
255
|
+
|----------|-------|-----------------|
|
|
256
|
+
| GATEWAY-001 | Bound to 0.0.0.0 | Bind to 127.0.0.1 |
|
|
257
|
+
| GATEWAY-003 | Plaintext token in config | Replace with `${OPENCLAW_AUTH_TOKEN}` |
|
|
258
|
+
| GATEWAY-004 | Approvals disabled | Enable approval confirmations |
|
|
259
|
+
| GATEWAY-005 | Sandbox disabled | Enable sandbox mode |
|
|
260
|
+
|
|
261
|
+
Always use `--dry-run` first to preview changes. Backups are created automatically.
|
|
207
262
|
|
|
208
263
|
## Environment Variables
|
|
209
264
|
|
|
@@ -248,4 +303,8 @@ Apache-2.0
|
|
|
248
303
|
|
|
249
304
|
---
|
|
250
305
|
|
|
251
|
-
|
|
306
|
+
## Secure What You Find
|
|
307
|
+
|
|
308
|
+
HackMyAgent finds vulnerabilities. **[AIM](https://github.com/opena2a-org/agent-identity-management)** fixes them — the open-source NHI platform for AI agents with cryptographic identity, governance, and access control.
|
|
309
|
+
|
|
310
|
+
→ [Get started with AIM](https://opena2a.org/docs/quick-start) | [Learn about NHI governance](https://opena2a.org/nhi)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hackmyagent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Security toolkit for AI agents - verify skills, harden setups, scan for exposures",
|
|
5
5
|
"bin": {
|
|
6
6
|
"hackmyagent": "dist/index.js"
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tsc",
|
|
15
15
|
"test": "echo 'No CLI tests yet'",
|
|
16
|
-
"lint": "eslint src --ext .ts"
|
|
16
|
+
"lint": "eslint src --ext .ts",
|
|
17
|
+
"prepublishOnly": "cp ../../README.md ./README.md"
|
|
17
18
|
},
|
|
18
19
|
"dependencies": {
|
|
19
20
|
"commander": "^12.0.0",
|