clawmoat 0.7.0 → 1.0.0

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.
Files changed (178) hide show
  1. package/.dockerignore +9 -0
  2. package/CHANGELOG.md +18 -0
  3. package/CONTRIBUTING.md +4 -2
  4. package/DEMO.md +87 -0
  5. package/Dockerfile +5 -18
  6. package/README.md +294 -8
  7. package/SECURITY.md +58 -10
  8. package/THREAT_MODEL.md +129 -0
  9. package/agent/README.md +131 -0
  10. package/agent/index.js +471 -0
  11. package/agent/install-service.sh +94 -0
  12. package/agent/openclaw-hook.js +453 -0
  13. package/agent/provider-setup.js +649 -0
  14. package/agent/setup.js +274 -0
  15. package/assets/BADGE-USAGE.md +20 -0
  16. package/assets/clawmoat-badge.svg +21 -0
  17. package/bin/clawmoat.js +468 -111
  18. package/docs/affiliates/dashboard.html +124 -0
  19. package/docs/affiliates/index.html +236 -0
  20. package/docs/agent-install.html +183 -0
  21. package/docs/ai-agent-security-scanner.html +10 -6
  22. package/docs/badge/index.html +149 -0
  23. package/docs/badge/scanning.svg +23 -0
  24. package/docs/blog/386-malicious-skills.html +262 -0
  25. package/docs/blog/40000-exposed-openclaw-instances.html +201 -0
  26. package/docs/blog/agent-trust-protocol.html +198 -0
  27. package/docs/blog/ai-agent-earns-commissions.html +230 -0
  28. package/docs/blog/bugmageddon-agent-firewall.html +174 -0
  29. package/docs/blog/calculator-math.html +180 -0
  30. package/docs/blog/clawmoat-vs-llamafirewall-nemo-guardrails.html +229 -0
  31. package/docs/blog/host-guardian-launch.html +18 -8
  32. package/docs/blog/ibm-experts-agent-runtime-protection.html +247 -0
  33. package/docs/blog/index.html +211 -9
  34. package/docs/blog/langchain-security-tutorial.html +18 -8
  35. package/docs/blog/mcp-30-cves-security-crisis.html +286 -0
  36. package/docs/blog/meta-researcher-rogue-agent.html +201 -0
  37. package/docs/blog/microsoft-openclaw-workstation-security.html +235 -0
  38. package/docs/blog/nist-ai-agent-standards-clawmoat.html +377 -0
  39. package/docs/blog/oasis-websocket-hijack.html +212 -0
  40. package/docs/blog/ollama-openclaw-security.html +160 -0
  41. package/docs/blog/openclaw-enterprise-readiness-claw10.html +199 -0
  42. package/docs/blog/openclaw-security-reckoning-2026.html +368 -0
  43. package/docs/blog/owasp-agentic-ai-top10.html +18 -8
  44. package/docs/blog/securing-ai-agents.html +18 -8
  45. package/docs/blog/supply-chain-agents.html +18 -8
  46. package/docs/business/index.html +525 -0
  47. package/docs/business/install.html +261 -0
  48. package/docs/checklist.html +174 -0
  49. package/docs/compare/index.html +122 -0
  50. package/docs/compare/lakera/index.html +62 -0
  51. package/docs/compare/llm-guard/index.html +49 -0
  52. package/docs/compare/snyk-agent-scan/index.html +63 -0
  53. package/docs/compare.html +10 -6
  54. package/docs/dashboard/index.html +520 -0
  55. package/docs/finance/index.html +220 -0
  56. package/docs/guides/business-deployment.html +770 -0
  57. package/docs/hall-of-fame.html +174 -0
  58. package/docs/index.html +447 -154
  59. package/docs/install.sh +557 -0
  60. package/docs/integrations/langchain.html +14 -6
  61. package/docs/integrations/openai.html +14 -6
  62. package/docs/integrations/openclaw.html +55 -7
  63. package/docs/plans/2026-03-26-threat-intel-api.md +255 -0
  64. package/docs/plans/2026-04-14-bugmageddon-marketing-pack.md +329 -0
  65. package/docs/plans/2026-04-14-clawmoat-v1-bugmageddon.md +248 -0
  66. package/docs/plans/2026-04-14-v1-release-update.md +91 -0
  67. package/docs/plans/2026-04-19-supabase-audit.md +68 -0
  68. package/docs/plans/2026-05-12-sales-push.md +303 -0
  69. package/docs/playground/index.html +893 -0
  70. package/docs/playground.html +4 -7
  71. package/docs/privacy-policy/index.html +122 -0
  72. package/docs/rfcs/defense-in-depth.md +467 -0
  73. package/docs/scan/index.html +358 -0
  74. package/docs/services/case-study.html +255 -0
  75. package/docs/services/downloads/install-openclaw.bat +45 -0
  76. package/docs/services/downloads/install-openclaw.command +38 -0
  77. package/docs/services/downloads/install-openclaw.sh +38 -0
  78. package/docs/services/get-started.html +165 -0
  79. package/docs/services/index.html +598 -0
  80. package/docs/services/multi-agent-security.html +284 -0
  81. package/docs/services/one-pager.html +99 -0
  82. package/docs/services/pitch-deck.html +229 -0
  83. package/docs/services/roi-calculator.html +258 -0
  84. package/docs/sitemap.xml +192 -2
  85. package/docs/support/index.html +135 -0
  86. package/docs/templates/customer-service/HEARTBEAT.md +61 -0
  87. package/docs/templates/customer-service/MEMORY.md +89 -0
  88. package/docs/templates/customer-service/SOUL.md +41 -0
  89. package/docs/templates/customer-service/USER.md +56 -0
  90. package/docs/templates/executive/HEARTBEAT.md +86 -0
  91. package/docs/templates/executive/MEMORY.md +92 -0
  92. package/docs/templates/executive/SOUL.md +44 -0
  93. package/docs/templates/executive/USER.md +62 -0
  94. package/docs/templates/finance/HEARTBEAT.md +58 -0
  95. package/docs/templates/finance/MEMORY.md +87 -0
  96. package/docs/templates/finance/SOUL.md +38 -0
  97. package/docs/templates/finance/USER.md +53 -0
  98. package/docs/templates/index.html +115 -0
  99. package/docs/templates/operations/HEARTBEAT.md +63 -0
  100. package/docs/templates/operations/MEMORY.md +68 -0
  101. package/docs/templates/operations/SOUL.md +38 -0
  102. package/docs/templates/operations/USER.md +49 -0
  103. package/docs/templates/sales/HEARTBEAT.md +55 -0
  104. package/docs/templates/sales/MEMORY.md +89 -0
  105. package/docs/templates/sales/SOUL.md +34 -0
  106. package/docs/templates/sales/USER.md +54 -0
  107. package/docs/terms-of-service/index.html +122 -0
  108. package/eslint.config.js +32 -0
  109. package/evals/README.md +29 -0
  110. package/evals/cases.json +390 -0
  111. package/evals/results.md +68 -0
  112. package/evals/run.js +180 -0
  113. package/examples/basic-usage.js +38 -0
  114. package/examples/demo-attack/demo.js +186 -0
  115. package/examples/python-quickstart/README.md +54 -0
  116. package/examples/python-quickstart/clawmoat_client.py +167 -0
  117. package/examples/video-demo/README.md +14 -0
  118. package/examples/video-demo/scene-a-normal.js +29 -0
  119. package/examples/video-demo/scene-b-attack-arrives.js +31 -0
  120. package/examples/video-demo/scene-c-hijack.js +44 -0
  121. package/examples/video-demo/scene-d-clawmoat.js +46 -0
  122. package/integrations/crewai/README.md +32 -0
  123. package/integrations/crewai/clawmoat_crewai/__init__.py +17 -0
  124. package/integrations/crewai/clawmoat_crewai/guard.py +103 -0
  125. package/integrations/crewai/pyproject.toml +21 -0
  126. package/integrations/langchain/README.md +91 -0
  127. package/integrations/langchain/clawmoat_langchain/__init__.py +17 -0
  128. package/integrations/langchain/clawmoat_langchain/callback.py +489 -0
  129. package/integrations/langchain/pyproject.toml +32 -0
  130. package/integrations/litellm/README.md +324 -0
  131. package/integrations/litellm/clawmoat_litellm/__init__.py +21 -0
  132. package/integrations/litellm/clawmoat_litellm/callback.py +329 -0
  133. package/integrations/litellm/clawmoat_litellm/proxy_middleware.py +224 -0
  134. package/integrations/litellm/pyproject.toml +74 -0
  135. package/integrations/openai-agents/README.md +392 -0
  136. package/integrations/openai-agents/clawmoat_openai_agents/__init__.py +20 -0
  137. package/integrations/openai-agents/clawmoat_openai_agents/guardrail.py +431 -0
  138. package/integrations/openai-agents/clawmoat_openai_agents/middleware.py +311 -0
  139. package/integrations/openai-agents/pyproject.toml +76 -0
  140. package/package.json +6 -5
  141. package/plugins/openclaw-adapter/PHASE1.md +439 -0
  142. package/plugins/openclaw-adapter/README.md +103 -0
  143. package/plugins/openclaw-adapter/SPEC.md +1644 -0
  144. package/plugins/openclaw-adapter/package.json +31 -0
  145. package/plugins/openclaw-adapter/src/index.test.ts +226 -0
  146. package/plugins/openclaw-adapter/src/index.ts +140 -0
  147. package/plugins/openclaw-adapter/tsconfig.json +14 -0
  148. package/server/data/threats.json +290 -0
  149. package/server/index.js +224 -10
  150. package/src/adapters/express.js +161 -0
  151. package/src/adapters/index.js +92 -0
  152. package/src/adapters/langchain.js +185 -0
  153. package/src/approval/index.js +456 -0
  154. package/src/ban-scanner.js +200 -0
  155. package/src/boundary-scanner.js +296 -0
  156. package/src/ci-scanner.js +279 -0
  157. package/src/code-scanner.js +245 -0
  158. package/src/enforce.js +166 -0
  159. package/src/finance/index.js +585 -0
  160. package/src/finance/mcp-firewall.js +486 -0
  161. package/src/formatters/json.js +80 -0
  162. package/src/formatters/sarif.js +388 -0
  163. package/src/guardian/alerts.js +34 -3
  164. package/src/guardian/gateway-monitor.js +590 -0
  165. package/src/guardian/index.js +41 -2
  166. package/src/index.js +105 -0
  167. package/src/integrations/agentmesh.js +501 -0
  168. package/src/language-detector.js +201 -0
  169. package/src/mcp-scanner.js +253 -0
  170. package/src/multimodal/index.js +579 -0
  171. package/src/obfuscation-scanner.js +457 -0
  172. package/src/policy-engine.js +402 -0
  173. package/src/scanners/dependency-attacks.js +128 -0
  174. package/src/scanners/prompt-injection.js +18 -0
  175. package/src/scanners/supply-chain.js +14 -0
  176. package/src/templates/default-config.yml +90 -0
  177. package/src/vuln-ops/exploitability.js +46 -0
  178. package/src/watch/live-monitor.js +720 -0
@@ -66,14 +66,14 @@ footer{border-top:1px solid var(--navy-mid);padding:40px 0;text-align:center;col
66
66
  <body>
67
67
 
68
68
  <nav>
69
- <div class="container" style="max-width:1140px">
69
+ <div class="container">
70
70
  <a href="/" class="logo">🏰 Claw<span>Moat</span></a>
71
+ <button class="menu-toggle" onclick="document.querySelector('.nav-links').classList.toggle('open')" aria-label="Menu">☰</button>
71
72
  <div class="nav-links">
72
- <a href="/">Home</a>
73
- <a href="/integrations/openclaw.html" style="color:var(--white)">Integrations</a>
73
+ <a href="/">Security</a>
74
+ <a href="/services/">AI Agents</a>
74
75
  <a href="/blog/">Blog</a>
75
- <a href="https://github.com/darfaz/clawmoat">GitHub</a>
76
- <a href="/#waitlist" class="btn-sm">Get Early Access</a>
76
+ <a href="https://github.com/darfaz/clawmoat">GitHub ↗</a>
77
77
  </div>
78
78
  </div>
79
79
  </nav>
@@ -293,19 +293,67 @@ done</code></pre>
293
293
  </div>
294
294
  </div>
295
295
 
296
+ <h2>Official Sanitizer Plugin</h2>
297
+
298
+ <div class="callout">
299
+ <strong>🔌 NEW:</strong> ClawMoat is now the <strong>reference implementation</strong> for OpenClaw's pluggable sanitizer pipeline. Every piece of content — transcripts, MCP tool results, agent messages — can pass through ClawMoat before reaching the AI agent.
300
+ </div>
301
+
302
+ <pre><code><span class="lang-label">Shell</span>npm install @openclaw/plugin-clawmoat</code></pre>
303
+
304
+ <pre><code><span class="lang-label">JSON</span>// openclaw.json
305
+ {
306
+ "sanitizers": [{
307
+ "module": "@openclaw/plugin-clawmoat",
308
+ "threshold": "medium",
309
+ "scanSecrets": true
310
+ }]
311
+ }</code></pre>
312
+
313
+ <p>The plugin provides:</p>
314
+ <ul>
315
+ <li><strong>Configurable block thresholds</strong> — low, medium, high, critical</li>
316
+ <li><strong>Clean threat mapping</strong> — ClawMoat threat types → OpenClaw ruleIds</li>
317
+ <li><strong>Full audit logging</strong> — every scan result recorded</li>
318
+ <li><strong>10 test cases</strong> covering injection, credentials, thresholds, and edge cases</li>
319
+ </ul>
320
+
321
+ <p>See the <a href="https://github.com/darfaz/clawmoat/tree/main/plugins/openclaw-adapter">full spec and implementation guide</a> on GitHub.</p>
322
+
323
+ <h2>ClawMoat Dashboard</h2>
324
+
325
+ <p>Pro subscribers get access to the <a href="https://app.clawmoat.com"><strong>ClawMoat Dashboard</strong></a> — a hosted security console where you can:</p>
326
+
327
+ <ul>
328
+ <li><strong>Scan text in your browser</strong> — paste any content and get instant threat analysis</li>
329
+ <li><strong>Generate API keys</strong> — integrate ClawMoat scanning into your own tools via REST API</li>
330
+ <li><strong>View scan history</strong> — full audit trail of every scan with threat level badges</li>
331
+ <li><strong>Monitor stats</strong> — total scans, threats detected, last scan time</li>
332
+ </ul>
333
+
334
+ <p>No terminal required. Log in with your email and start scanning.</p>
335
+
296
336
  <h2>Next Steps</h2>
297
337
  <ul>
338
+ <li><a href="https://app.clawmoat.com">ClawMoat Dashboard</a> — scan, monitor, and manage API keys</li>
298
339
  <li><a href="/integrations/langchain.html">LangChain Integration</a> — use ClawMoat with LangChain agents</li>
299
340
  <li><a href="/integrations/openai.html">OpenAI Integration</a> — secure function calling</li>
300
341
  <li><a href="https://github.com/darfaz/clawmoat">GitHub</a> — contribute, report issues, star the repo</li>
301
- <li><a href="/#waitlist">Join the waitlist</a> — get early access to ClawMoat Pro with cloud dashboards</li>
302
342
  </ul>
303
343
 
304
344
  </div>
305
345
  </article>
306
346
 
307
347
  <footer>
308
- <p>🏰 ClawMoat — Security moat for AI agents</p>
348
+ <div class="container">
349
+ <div style="display:flex;gap:24px;justify-content:center;flex-wrap:wrap;margin-bottom:16px">
350
+ <a href="https://github.com/darfaz/clawmoat" style="color:var(--gray)">GitHub</a>
351
+ <a href="https://www.npmjs.com/package/clawmoat" style="color:var(--gray)">npm</a>
352
+ <a href="/blog/" style="color:var(--gray)">Blog</a>
353
+ <a href="mailto:hello@clawmoat.com" style="color:var(--gray)">hello@clawmoat.com</a>
354
+ </div>
355
+ <p style="text-align:center;color:var(--gray);font-size:.85rem">© 2026 ClawMoat</p>
356
+ </div>
309
357
  </footer>
310
358
 
311
359
  </body>
@@ -0,0 +1,255 @@
1
+ # ClawMoat Threat Intel API — Implementation Plan
2
+
3
+ > **For implementation:** Use the executing-plans skill to implement this plan task-by-task.
4
+
5
+ **Goal:** Ship an MVP API endpoint that serves structured AI agent security threat intelligence, with Stripe metered billing.
6
+
7
+ **Architecture:** Express.js server (extends existing ~/clawmoat/server/), backed by a JSON threat database that Leo populates from daily security news scans. Endpoints serve filtered threat data. Stripe usage-based billing tracks API calls per key. Deployed on Railway.
8
+
9
+ **Tech Stack:** Express.js, Stripe metered billing, JSON flat-file storage (MVP), API key auth, Railway deploy
10
+
11
+ ---
12
+
13
+ ## Task 1: Threat Database Schema & Seed Data
14
+
15
+ **Files:**
16
+ - Create: `server/data/threats.json`
17
+ - Create: `server/data/schema.md`
18
+
19
+ **Step 1: Define the threat schema**
20
+
21
+ ```json
22
+ {
23
+ "id": "CLAWMOAT-2026-0001",
24
+ "title": "LiteLLM .pth File Injection",
25
+ "published": "2026-03-24T00:00:00Z",
26
+ "updated": "2026-03-26T00:00:00Z",
27
+ "severity": "critical",
28
+ "category": "supply-chain",
29
+ "tags": ["python", "pypi", "credential-theft", "pth-injection"],
30
+ "summary": "LiteLLM versions 1.82.7-1.82.8 contain credential-stealing .pth payload",
31
+ "affected": {
32
+ "packages": ["litellm==1.82.7", "litellm==1.82.8"],
33
+ "ecosystems": ["pypi"]
34
+ },
35
+ "ioc": {
36
+ "domains": ["models.litellm.cloud"],
37
+ "files": ["litellm_init.pth"],
38
+ "hashes": [],
39
+ "patterns": ["exec(base64.b64decode(", ".pth import subprocess"]
40
+ },
41
+ "detection": {
42
+ "clawmoat_module": "scanners/supply-chain",
43
+ "clawmoat_function": "scanSkillContent",
44
+ "rules_triggered": ["obfuscated_exec_b64", "pth_file_injection", "exfil_litellm_lookalike"]
45
+ },
46
+ "references": [
47
+ "https://github.com/BerriAI/litellm/issues/24512",
48
+ "https://news.ycombinator.com/item?id=47501426",
49
+ "https://awesomeagents.ai/news/litellm-supply-chain-compromise-credential-theft/"
50
+ ],
51
+ "mitigation": "Rotate all credentials on affected systems. Check: pip show litellm | grep Version. Search: find / -name litellm_init.pth"
52
+ }
53
+ ```
54
+
55
+ **Step 2: Seed with this week's 5 threats**
56
+
57
+ Populate threats.json with:
58
+ 1. LiteLLM .pth injection (CLAWMOAT-2026-0001)
59
+ 2. Meta AI agent data leak (CLAWMOAT-2026-0002)
60
+ 3. API key exposure on 10K websites (CLAWMOAT-2026-0003)
61
+ 4. LeakBase credential marketplace (CLAWMOAT-2026-0004)
62
+ 5. Gemini API key theft — $82K bill (CLAWMOAT-2026-0005)
63
+
64
+ **Step 3: Commit**
65
+
66
+ ```
67
+ git commit -m "feat: threat intel database schema + seed data (5 threats)"
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Task 2: API Endpoint — GET /api/v1/threats
73
+
74
+ **Files:**
75
+ - Create: `server/routes/threats.js`
76
+ - Modify: `server/index.js` (mount route)
77
+ - Create: `server/middleware/api-key-auth.js`
78
+ - Test: `server/tests/threats.test.js`
79
+
80
+ **Step 1: Write failing test**
81
+
82
+ ```javascript
83
+ const request = require('supertest');
84
+ const app = require('../index');
85
+
86
+ describe('GET /api/v1/threats', () => {
87
+ it('returns 401 without API key', async () => {
88
+ const res = await request(app).get('/api/v1/threats');
89
+ expect(res.status).toBe(401);
90
+ });
91
+
92
+ it('returns threats with valid API key', async () => {
93
+ const res = await request(app)
94
+ .get('/api/v1/threats')
95
+ .set('X-API-Key', 'test-key-123');
96
+ expect(res.status).toBe(200);
97
+ expect(res.body.threats).toBeInstanceOf(Array);
98
+ expect(res.body.threats.length).toBeGreaterThan(0);
99
+ });
100
+
101
+ it('filters by category', async () => {
102
+ const res = await request(app)
103
+ .get('/api/v1/threats?category=supply-chain')
104
+ .set('X-API-Key', 'test-key-123');
105
+ expect(res.body.threats.every(t => t.category === 'supply-chain')).toBe(true);
106
+ });
107
+
108
+ it('filters by severity', async () => {
109
+ const res = await request(app)
110
+ .get('/api/v1/threats?severity=critical')
111
+ .set('X-API-Key', 'test-key-123');
112
+ expect(res.body.threats.every(t => t.severity === 'critical')).toBe(true);
113
+ });
114
+
115
+ it('filters by date range', async () => {
116
+ const res = await request(app)
117
+ .get('/api/v1/threats?since=2026-03-24')
118
+ .set('X-API-Key', 'test-key-123');
119
+ expect(res.body.threats.length).toBeGreaterThan(0);
120
+ });
121
+ });
122
+ ```
123
+
124
+ **Step 2: Run test, confirm failure**
125
+
126
+ **Step 3: Implement API key middleware**
127
+
128
+ ```javascript
129
+ // server/middleware/api-key-auth.js
130
+ const validKeys = new Map(); // loaded from server/data/api-keys.json
131
+
132
+ function apiKeyAuth(req, res, next) {
133
+ const key = req.headers['x-api-key'];
134
+ if (!key) return res.status(401).json({ error: 'API key required' });
135
+ const record = validKeys.get(key);
136
+ if (!record) return res.status(403).json({ error: 'Invalid API key' });
137
+ req.apiUser = record;
138
+ next();
139
+ }
140
+ ```
141
+
142
+ **Step 4: Implement threats route**
143
+
144
+ Query params: `category`, `severity`, `since`, `tags`, `limit` (default 20, max 100)
145
+
146
+ Response format:
147
+ ```json
148
+ {
149
+ "threats": [...],
150
+ "count": 5,
151
+ "total": 5,
152
+ "updated": "2026-03-26T15:00:00Z"
153
+ }
154
+ ```
155
+
156
+ **Step 5: Run tests, confirm pass**
157
+
158
+ **Step 6: Commit**
159
+
160
+ ```
161
+ git commit -m "feat: GET /api/v1/threats endpoint with filtering + API key auth"
162
+ ```
163
+
164
+ ---
165
+
166
+ ## Task 3: GET /api/v1/threats/:id — Single Threat Detail
167
+
168
+ **Files:**
169
+ - Modify: `server/routes/threats.js`
170
+ - Modify: `server/tests/threats.test.js`
171
+
172
+ Returns full threat object including IOCs, detection rules, mitigation steps.
173
+
174
+ ---
175
+
176
+ ## Task 4: GET /api/v1/ioc — Indicators of Compromise Feed
177
+
178
+ **Files:**
179
+ - Create: `server/routes/ioc.js`
180
+ - Test: `server/tests/ioc.test.js`
181
+
182
+ Aggregates all IOCs across threats into a flat feed. Useful for agents to bulk-update their blocklists.
183
+
184
+ ```json
185
+ {
186
+ "domains": ["models.litellm.cloud", ...],
187
+ "files": ["litellm_init.pth", ...],
188
+ "patterns": ["exec(base64.b64decode(", ...],
189
+ "updated": "2026-03-26T15:00:00Z"
190
+ }
191
+ ```
192
+
193
+ ---
194
+
195
+ ## Task 5: Stripe Metered Billing
196
+
197
+ **Files:**
198
+ - Create: `server/middleware/usage-tracker.js`
199
+ - Create: `server/billing/stripe.js`
200
+ - Modify: `server/middleware/api-key-auth.js` (link to Stripe customer)
201
+
202
+ **Pricing:**
203
+ - Free tier: 100 calls/month (no card required)
204
+ - Pro: $4.99/mo flat + $0.001/call over 5,000
205
+ - Unlimited: $19.99/mo
206
+
207
+ **Implementation:**
208
+ 1. On each API call, increment usage counter in api-keys.json
209
+ 2. Stripe webhook on subscription create → generate API key → email to user
210
+ 3. Daily cron: report usage to Stripe metered billing
211
+ 4. Free tier: check call count, return 429 when exceeded
212
+
213
+ ---
214
+
215
+ ## Task 6: API Key Self-Service
216
+
217
+ **Files:**
218
+ - Create: `server/routes/keys.js`
219
+ - Test: `server/tests/keys.test.js`
220
+
221
+ POST /api/v1/keys — generate a free-tier API key (email required)
222
+ GET /api/v1/keys/:key/usage — check your usage
223
+
224
+ ---
225
+
226
+ ## Task 7: Railway Deploy
227
+
228
+ **Files:**
229
+ - Modify: `server/package.json` (start script)
230
+ - Create: `server/Procfile`
231
+ - Create: `server/.env.example`
232
+
233
+ Environment vars: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, API_MASTER_KEY
234
+
235
+ Deploy to Railway on clawmoat.com subdomain: `api.clawmoat.com`
236
+
237
+ ---
238
+
239
+ ## Task 8: Documentation
240
+
241
+ **Files:**
242
+ - Create: `docs/api/README.md`
243
+ - Create: `docs/api/openapi.yaml`
244
+ - Modify: `README.md` (add Threat Intel API section)
245
+
246
+ OpenAPI spec for the full API. Add to clawmoat.com as /docs/api page.
247
+
248
+ ---
249
+
250
+ ## MVP Scope (Tonight)
251
+
252
+ Tasks 1-3 + 7 = working API with seed data, deployed on Railway.
253
+ Tasks 4-6 + 8 = fast follow (this week).
254
+
255
+ **Total estimated time: 4-5 hours for MVP, 2-3 more for billing + docs.**
@@ -0,0 +1,329 @@
1
+ # ClawMoat marketing pack — Bugmageddon / WSJ / Mythos
2
+
3
+ ## Core angle
4
+
5
+ WSJ gave the market a clean phrase: **bugmageddon**.
6
+
7
+ Use it to sharpen ClawMoat's category:
8
+
9
+ **Old framing:** prompt injection scanner / AI security tool<br>
10
+ **Better framing:** **agent firewall for the bugmageddon era**
11
+
12
+ The point is simple:
13
+
14
+ - AI is getting much better at finding vulnerabilities
15
+ - Attackers will get that capability too
16
+ - Patching will stay slower than discovery
17
+ - AI agents have the permissions needed to turn bugs into impact
18
+ - Therefore the missing layer is **runtime containment**
19
+
20
+ ## Best ClawMoat message
21
+
22
+ **They protect the model. ClawMoat protects the machine.**
23
+
24
+ Variants:
25
+ - **Bug discovery is accelerating. Containment needs to catch up.**
26
+ - **When AI finds more bugs, agent runtime security stops being optional.**
27
+ - **The patch queue is about to get longer. Your agent permissions should get tighter.**
28
+
29
+ ---
30
+
31
+ ## X post options
32
+
33
+ ### Option 1, sharpest
34
+
35
+ WSJ called it “bugmageddon.”
36
+
37
+ Anthropic’s Mythos reportedly found a 27-year-old bug plus thousands more high-severity flaws.
38
+
39
+ That doesn’t just mean defenders get faster.
40
+ It means exploit discovery gets cheaper.
41
+
42
+ And AI agents already have shell, browser, file system, API key, and MCP access.
43
+
44
+ The question is no longer just “can AI find bugs?”
45
+ It’s “what stops your agent from turning them into damage?”
46
+
47
+ That’s the layer ClawMoat is built for.
48
+
49
+ Open-source agent firewall.
50
+ https://clawmoat.com
51
+
52
+ ### Option 2, more founder-voice
53
+
54
+ The WSJ bugmageddon piece got one thing very right:
55
+ we’re heading into a world where AI finds vulnerabilities faster than most teams can fix them.
56
+
57
+ That changes the job.
58
+
59
+ Static scanning matters.
60
+ Patching matters.
61
+ But once agents have real permissions, you also need runtime controls.
62
+
63
+ What can it read?
64
+ What can it run?
65
+ What can it send out?
66
+ What gets blocked?
67
+ What gets logged?
68
+
69
+ That’s ClawMoat.
70
+ https://clawmoat.com
71
+
72
+ ### Option 3, shortest
73
+
74
+ Bugmageddon = AI finds bugs faster, attackers exploit faster, patches lag.
75
+
76
+ Agents make that worse because they already have the keys.
77
+
78
+ ClawMoat is the firewall between the agent and the machine.
79
+ https://clawmoat.com
80
+
81
+ ---
82
+
83
+ ## X thread
84
+
85
+ 1. WSJ called it “bugmageddon.” Good term.
86
+
87
+ If frontier models can find vulnerabilities humans missed for decades, the economics of attack just changed.
88
+
89
+ 2. The issue is not just more bugs found by defenders.
90
+
91
+ It’s that exploit discovery gets cheaper, faster, and eventually available to anyone with a decent model stack.
92
+
93
+ 3. Most teams still think in old security terms:
94
+ find bug → patch bug → move on.
95
+
96
+ But patching is slow. Backlogs are real. And agents now sit on top of the blast radius.
97
+
98
+ 4. Your agent has shell access, browser control, file I/O, MCP tools, secrets, cloud creds, internal docs.
99
+
100
+ So the question becomes:
101
+ what happens when something gets through?
102
+
103
+ 5. Prompt filters are not enough.
104
+ Static scans are not enough.
105
+ You need runtime containment.
106
+
107
+ What can the agent read?
108
+ What can it execute?
109
+ What can it exfiltrate?
110
+ What gets blocked automatically?
111
+
112
+ 6. That’s the ClawMoat thesis.
113
+
114
+ Not “make prompts safer.”
115
+ Make agents safe to run on real machines.
116
+
117
+ 7. ClawMoat scans inbound content, outbound content, MCP configs, and tool use.
118
+ Then it enforces policy at runtime.
119
+
120
+ Because in the bugmageddon era, detection without containment is not enough.
121
+
122
+ 8. Open source.
123
+ Agent firewall.
124
+ Built for the moment the market is finally waking up.
125
+
126
+ https://clawmoat.com
127
+ https://github.com/darfaz/clawmoat
128
+
129
+ ---
130
+
131
+ ## Reddit post
132
+
133
+ ### Suggested subreddits
134
+ - r/LocalLLaMA
135
+ - r/ClaudeAI
136
+ - r/OpenAI
137
+ - r/artificial
138
+ - r/cybersecurity
139
+ - r/netsec (more technical, tone down the marketing)
140
+ - r/mcp
141
+
142
+ ### Title option 1
143
+ WSJ says AI is finding bugs humans missed for decades. I think the real issue is agent containment.
144
+
145
+ ### Title option 2
146
+ If bug discovery gets automated, AI agent runtime security becomes mandatory
147
+
148
+ ### Body
149
+ The WSJ bugmageddon article is getting attention because of the headline claim: frontier AI can now find serious vulnerabilities that sat undiscovered for years.
150
+
151
+ That’s interesting, but I think the more important implication is downstream.
152
+
153
+ If exploit discovery gets faster, while patching stays slow, then AI agents become a very uncomfortable part of the stack.
154
+
155
+ They already have:
156
+ - shell access
157
+ - browser control
158
+ - file system access
159
+ - API keys and local secrets
160
+ - MCP servers with broad permissions
161
+
162
+ So the real question stops being “can AI find bugs?” and becomes “what stops an agent from turning a bug, prompt injection, or bad tool chain into a real compromise?”
163
+
164
+ That’s why I’ve been building ClawMoat.
165
+ It’s an open-source agent firewall that sits between the agent and the machine.
166
+
167
+ It does a few concrete things:
168
+ - scans inbound content for prompt injection and poisoned instructions
169
+ - scans outbound content for secrets and exfiltration
170
+ - audits MCP configs and risky permissions
171
+ - enforces policy on shell, file, browser, and network actions
172
+
173
+ I think this category is going to matter a lot more over the next 12 months.
174
+
175
+ Curious if people here agree with the core thesis:
176
+ **as bug discovery gets automated, runtime containment becomes more important than prompt-level safety alone.**
177
+
178
+ Repo: https://github.com/darfaz/clawmoat
179
+ Site: https://clawmoat.com
180
+
181
+ ---
182
+
183
+ ## Hacker News post draft
184
+
185
+ ### Title
186
+ Show HN: ClawMoat, an open-source agent firewall for the bugmageddon era
187
+
188
+ ### Text
189
+ WSJ just popularized “bugmageddon” as shorthand for AI finding vulnerabilities faster than humans can fix them.
190
+
191
+ I think that creates a second-order problem for agent builders.
192
+
193
+ Even if you patch aggressively, agents now have shell, browser, filesystem, and MCP access. So once a prompt injection, poisoned dependency, risky plugin, or newly discovered vuln gets through, the real question is what the agent is still allowed to do.
194
+
195
+ ClawMoat is my attempt at that layer.
196
+
197
+ It’s an open-source agent firewall that:
198
+ - scans inbound content
199
+ - scans outbound content
200
+ - audits MCP configs
201
+ - enforces policies on tool use
202
+ - logs everything for audit
203
+
204
+ I’d love technical feedback, especially from people running local agents on real machines.
205
+
206
+ https://github.com/darfaz/clawmoat
207
+
208
+ ---
209
+
210
+ ## LinkedIn post
211
+
212
+ The WSJ “bugmageddon” framing is worth paying attention to.
213
+
214
+ If frontier AI can find vulnerabilities humans missed for decades, then security teams are about to face a new asymmetry:
215
+
216
+ bug discovery speeds up<br>
217
+ weaponization speeds up<br>
218
+ patching does not
219
+
220
+ That matters even more in the age of AI agents.
221
+
222
+ Agents are not chatbots. They sit on top of shell access, browsers, files, API keys, MCP servers, and internal systems.
223
+
224
+ So the new question is not just whether AI can find more bugs.
225
+ The question is whether your runtime controls are strong enough when something gets through.
226
+
227
+ That is exactly why I built ClawMoat.
228
+
229
+ ClawMoat is an open-source agent firewall that scans content, audits MCP setups, and enforces policy between the agent and the machine.
230
+
231
+ I think this layer becomes much more important over the next year.
232
+
233
+ If you’re building or deploying AI agents, I’d love to compare notes.
234
+
235
+ https://clawmoat.com
236
+ https://github.com/darfaz/clawmoat
237
+
238
+ ---
239
+
240
+ ## Dev.to article draft
241
+
242
+ ### Title
243
+ Bugmageddon Is Coming. AI Agent Runtime Security Just Became Mandatory.
244
+
245
+ ### Subtitle
246
+ If AI can find bugs faster than teams can patch them, the missing layer is containment.
247
+
248
+ ### Outline
249
+
250
+ 1. Open with WSJ framing and the 27-year-old bug claim
251
+ 2. Explain the shift in attack economics
252
+ 3. Explain why patching remains the limiting factor
253
+ 4. Explain why agents amplify blast radius
254
+ 5. Distinguish prompt safety from runtime security
255
+ 6. Walk through what a practical containment layer does
256
+ 7. Position ClawMoat as open-source agent firewall
257
+ 8. End with concrete checklist + repo link
258
+
259
+ ### Strong opener
260
+ The scary part of the WSJ bugmageddon article is not that AI can find vulnerabilities.
261
+
262
+ The scary part is that once exploit discovery gets cheap, every over-permissioned AI agent becomes part of the attack surface.
263
+
264
+ ---
265
+
266
+ ## Homepage / hero update suggestions
267
+
268
+ Current category is good. Tighten it.
269
+
270
+ ### Hero copy test A
271
+ **The open-source agent firewall**<br>
272
+ AI is finding bugs faster. Stop agents from turning them into breaches.
273
+
274
+ ### Hero copy test B
275
+ **They protect the model. ClawMoat protects the machine.**<br>
276
+ Runtime security for AI agents with shell, browser, file system, and MCP access.
277
+
278
+ ### Hero copy test C
279
+ **Built for bugmageddon.**<br>
280
+ Contain what AI agents can do when vulnerabilities are inevitable.
281
+
282
+ ### Subhead inserts
283
+ - Scan prompts, outputs, MCP configs, and tool calls
284
+ - Enforce policy before the command runs
285
+ - Audit everything after
286
+
287
+ ---
288
+
289
+ ## CTA ideas
290
+
291
+ - **Run a free agent exposure scan**
292
+ - **Audit your MCP setup**
293
+ - **See what your agent can actually reach**
294
+ - **Install the firewall between your agent and your machine**
295
+
296
+ ---
297
+
298
+ ## Good discussion hooks
299
+
300
+ Use these to get replies instead of just impressions:
301
+
302
+ - “What’s the bigger risk: automated bug discovery or over-permissioned agents?”
303
+ - “Do you think prompt-level safety is enough once agents have shell access?”
304
+ - “If your coding agent gets exploited tomorrow, what actually stops data exfiltration?”
305
+ - “How many teams have real runtime policy around MCP today?”
306
+
307
+ ---
308
+
309
+ ## Recommended execution order
310
+
311
+ 1. Publish the blog post on ClawMoat site
312
+ 2. Post the short X post manually if API credits are still dead
313
+ 3. Post the Reddit piece in r/LocalLLaMA or r/cybersecurity
314
+ 4. Turn the blog into a Dev.to article the same day
315
+ 5. Update homepage hero with bugmageddon-era framing
316
+ 6. Reply to any comments with the same thesis: **detection matters, containment is the missing layer**
317
+
318
+ ---
319
+
320
+ ## Notes on source discipline
321
+
322
+ Use “reportedly” when referencing the 27-year-old bug and thousands-of-flaws claims unless citing Anthropic directly.
323
+
324
+ Good safe framing:
325
+ - “reported by WSJ / follow-on coverage”
326
+ - “Anthropic says”
327
+ - “the broader trend is what matters”
328
+
329
+ Avoid overstating details we cannot independently verify.