clawmoat 0.2.1 → 0.5.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 (56) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/Dockerfile +22 -0
  3. package/README.md +144 -5
  4. package/SECURITY.md +63 -0
  5. package/bin/clawmoat.js +186 -1
  6. package/docs/ai-agent-security-scanner.html +691 -0
  7. package/docs/apple-touch-icon.png +0 -0
  8. package/docs/blog/host-guardian-launch.html +345 -0
  9. package/docs/blog/host-guardian-launch.md +249 -0
  10. package/docs/blog/index.html +2 -0
  11. package/docs/blog/langchain-security-tutorial.html +319 -0
  12. package/docs/blog/owasp-agentic-ai-top10.html +2 -0
  13. package/docs/blog/securing-ai-agents.html +2 -0
  14. package/docs/compare.html +2 -0
  15. package/docs/favicon.png +0 -0
  16. package/docs/icon-192.png +0 -0
  17. package/docs/index.html +258 -65
  18. package/docs/integrations/langchain.html +2 -0
  19. package/docs/integrations/openai.html +2 -0
  20. package/docs/integrations/openclaw.html +2 -0
  21. package/docs/logo.png +0 -0
  22. package/docs/logo.svg +60 -0
  23. package/docs/mark-with-moat.svg +33 -0
  24. package/docs/mark.png +0 -0
  25. package/docs/mark.svg +30 -0
  26. package/docs/og-image.png +0 -0
  27. package/docs/playground.html +440 -0
  28. package/docs/positioning-v2.md +155 -0
  29. package/docs/report-demo.html +399 -0
  30. package/docs/thanks.html +2 -0
  31. package/examples/github-action-workflow.yml +94 -0
  32. package/logo.png +0 -0
  33. package/logo.svg +60 -0
  34. package/mark-with-moat.svg +33 -0
  35. package/mark.png +0 -0
  36. package/mark.svg +30 -0
  37. package/package.json +1 -1
  38. package/server/index.js +9 -5
  39. package/skill/README.md +57 -0
  40. package/skill/SKILL.md +49 -30
  41. package/skill/scripts/audit.sh +28 -0
  42. package/skill/scripts/scan.sh +32 -0
  43. package/skill/scripts/test.sh +13 -0
  44. package/src/guardian/alerts.js +138 -0
  45. package/src/guardian/index.js +686 -0
  46. package/src/guardian/network-log.js +281 -0
  47. package/src/guardian/skill-integrity.js +290 -0
  48. package/src/index.js +37 -0
  49. package/src/middleware/openclaw.js +76 -1
  50. package/src/scanners/excessive-agency.js +88 -0
  51. package/wiki/Architecture.md +103 -0
  52. package/wiki/CLI-Reference.md +167 -0
  53. package/wiki/FAQ.md +135 -0
  54. package/wiki/Home.md +70 -0
  55. package/wiki/Policy-Engine.md +229 -0
  56. package/wiki/Scanner-Modules.md +224 -0
@@ -0,0 +1,155 @@
1
+ # ClawMoat v2 Positioning — "Run AI Agents on Your Laptop Without Fear"
2
+
3
+ ## The Shift
4
+
5
+ **Before:** "Security scanner for AI agents" (feature)
6
+ **After:** "The trust layer between AI agents and your machine" (category)
7
+
8
+ ## New Tagline Options
9
+
10
+ 1. **"Run AI agents on your laptop. We watch your back."**
11
+ 2. **"Your machine. Your agent. Your rules."**
12
+ 3. **"The security moat between AI and your laptop."**
13
+ 4. **"Self-host AI agents fearlessly."**
14
+
15
+ Recommended: **"Your machine. Your agent. Your rules."**
16
+
17
+ ## Target Audience (Revised)
18
+
19
+ ### Primary: Self-Hosting AI Agent Users
20
+ - People running OpenClaw, Claude Code, Cursor, Aider, etc. on their actual machines
21
+ - Want the power of local agents but scared of giving AI shell/file access
22
+ - Technical enough to install npm packages, not security experts
23
+ - **Pain point:** "I want to run this on my laptop but what if it reads my SSH keys?"
24
+
25
+ ### Secondary: Agent Framework Developers
26
+ - Building with LangChain, CrewAI, AutoGen, OpenAI Agents SDK
27
+ - Need to ship security to their users without building it themselves
28
+ - Want to say "secured by ClawMoat" as a trust signal
29
+
30
+ ### Tertiary: Enterprise AI Teams
31
+ - Deploying agents internally on employee machines
32
+ - Need compliance, audit trails, policy enforcement
33
+ - Can't have agents accessing arbitrary credentials
34
+
35
+ ## Value Proposition
36
+
37
+ ```
38
+ Without ClawMoat:
39
+ AI Agent → Full access to everything → 😱
40
+
41
+ With ClawMoat:
42
+ AI Agent → ClawMoat Guardian → Only what's allowed → 😌
43
+ + Full audit trail of everything attempted
44
+ + Forbidden zones auto-protect your credentials
45
+ + Permission tiers you can dial up as trust grows
46
+ ```
47
+
48
+ ## New Pricing
49
+
50
+ ### Free (Open Source)
51
+ - Host Guardian with all 4 permission tiers
52
+ - 20+ forbidden zone patterns
53
+ - Dangerous command blocking
54
+ - Audit trail (in-memory)
55
+ - All scanners (prompt injection, secrets, PII, etc.)
56
+ - Community support via GitHub
57
+ - **Everything you need to secure one machine**
58
+
59
+ ### Pro — $14.99/mo or $149/yr
60
+ - Everything in Free
61
+ - **Threat intelligence feed** — new attack patterns pushed weekly
62
+ - **Persistent audit logs** — queryable, exportable, tamper-evident
63
+ - **Custom forbidden zones** — YAML-based, shareable configs
64
+ - **Real-time alerts** — Telegram, Slack, Discord, email notifications on violations
65
+ - **Dashboard** — web UI showing blocked attacks, audit trail, security score
66
+ - **Priority pattern updates** — when new agent exploits emerge, Pro gets patches first
67
+ - Email support
68
+
69
+ ### Team — $49/mo or $499/yr (up to 10 machines)
70
+ - Everything in Pro
71
+ - **Centralized policy management** — one config, all machines
72
+ - **Fleet dashboard** — see all your agents/machines in one view
73
+ - **Shared threat intelligence** — attacks on any machine update all
74
+ - **Role-based policies** — different tiers for different team members
75
+ - **Compliance reports** — SOC2-style audit exports
76
+ - **Slack/Teams integration** — security alerts in your team channels
77
+ - Priority support
78
+
79
+ ### Enterprise — Custom
80
+ - Everything in Team, unlimited machines
81
+ - **On-prem threat intelligence server**
82
+ - **Custom scanner development** — we build patterns for your stack
83
+ - **SLA** — guaranteed response times
84
+ - **SSO/SAML** — enterprise auth
85
+ - Dedicated support engineer
86
+
87
+ ## Why This Pricing Works
88
+
89
+ 1. **Free is genuinely useful** — not crippled. This drives adoption
90
+ 2. **Pro sells peace of mind** — "I run an agent on my laptop, I need alerts when something weird happens"
91
+ 3. **Team sells visibility** — "I have 5 engineers running agents, I need to see what they're doing"
92
+ 4. **Enterprise sells compliance** — "Our security team needs audit trails and SLA"
93
+
94
+ ## Competitive Landscape
95
+
96
+ | | ClawMoat | Rebuff.ai | LLM Guard | Prompt Armor |
97
+ |---|---|---|---|---|
98
+ | Host/laptop protection | ✅ | ❌ | ❌ | ❌ |
99
+ | Permission tiers | ✅ | ❌ | ❌ | ❌ |
100
+ | Filesystem boundaries | ✅ | ❌ | ❌ | ❌ |
101
+ | Command blocking | ✅ | ❌ | ❌ | ❌ |
102
+ | Audit trail | ✅ | ❌ | Partial | ❌ |
103
+ | Prompt injection | ✅ | ✅ | ✅ | ✅ |
104
+ | Zero dependencies | ✅ | ❌ | ❌ | ❌ |
105
+ | Open source | ✅ | Partial | ✅ | ❌ |
106
+ | Framework agnostic | ✅ | ✅ | ✅ | ❌ |
107
+
108
+ **We're the only one protecting the HOST, not just the prompts.**
109
+
110
+ ## Content Strategy
111
+
112
+ ### Launch Blog Post
113
+ "We Run an AI Agent on Our Founder's Laptop — Here's How We Secured It"
114
+ - Real story of dogfooding ClawMoat
115
+ - Show actual attack attempts and blocks
116
+ - "Try to break it" challenge
117
+
118
+ ### Ongoing Content
119
+ - Weekly "Attack of the Week" — real patterns we caught
120
+ - "What Could Go Wrong" series — agent horror stories + how ClawMoat prevents them
121
+ - Integration guides for every major framework
122
+ - "Security Score" badges for repos
123
+
124
+ ### PR Angle
125
+ - "Come hack our agent" bounty program
126
+ - First open-source laptop security layer for AI agents
127
+ - OWASP Agentic AI alignment
128
+
129
+ ## Go-to-Market
130
+
131
+ 1. **Week 1:** Publish v0.4.0, blog post, update website
132
+ 2. **Week 2:** Integration guides (OpenClaw, LangChain, CrewAI)
133
+ 3. **Week 3:** "Come hack our agent" challenge launch
134
+ 4. **Week 4:** HN Show HN, Reddit posts, Dev.to
135
+ 5. **Month 2:** Pro tier launch with dashboard MVP
136
+ 6. **Month 3:** Team tier with fleet management
137
+
138
+ ## Stripe Updates Needed
139
+
140
+ Old prices → New prices:
141
+ - Pro: $9.99/mo → $14.99/mo (more value now)
142
+ - Pro Yearly: $99/yr → $149/yr
143
+ - Team: $49/mo → same
144
+ - Team Yearly: $499/yr → same
145
+
146
+ ## Key Messages
147
+
148
+ **For individuals:**
149
+ "You wouldn't give a stranger the keys to your house. Why give an AI agent unrestricted access to your laptop?"
150
+
151
+ **For teams:**
152
+ "Your developers are running AI agents on their machines right now. Do you know what those agents can access?"
153
+
154
+ **For the market:**
155
+ "Prompt injection scanning is table stakes. Host protection is the real game."
@@ -0,0 +1,399 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <link rel="icon" type="image/png" href="/favicon.png">
5
+ <link rel="apple-touch-icon" href="/apple-touch-icon.png">
6
+ <meta charset="UTF-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+ <title>Sample Security Report — ClawMoat Enterprise</title>
9
+ <meta name="description" content="See what a ClawMoat Enterprise AI agent security assessment report looks like. Professional, print-ready audit reports.">
10
+ <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🏰</text></svg>">
11
+ <style>
12
+ *{margin:0;padding:0;box-sizing:border-box}
13
+ :root{--navy:#0F172A;--navy-light:#1E293B;--navy-mid:#334155;--blue:#3B82F6;--emerald:#10B981;--white:#F8FAFC;--gray:#94A3B8;--red:#EF4444;--amber:#F59E0B;--orange:#F97316}
14
+ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:var(--navy);color:var(--white);line-height:1.6}
15
+ a{color:var(--blue);text-decoration:none}
16
+ a:hover{text-decoration:underline}
17
+
18
+ /* CTA Banner */
19
+ .cta-banner{background:linear-gradient(135deg,var(--blue),#6366F1);text-align:center;padding:14px 24px;font-size:.95rem;font-weight:600;position:sticky;top:0;z-index:200}
20
+ .cta-banner a{color:#fff;text-decoration:underline}
21
+ .cta-banner span{opacity:.9}
22
+
23
+ /* Back nav */
24
+ .back-nav{background:rgba(15,23,42,.95);backdrop-filter:blur(12px);border-bottom:1px solid rgba(59,130,246,.15);padding:16px 0}
25
+ .back-nav .inner{max-width:1140px;margin:0 auto;padding:0 24px;display:flex;align-items:center;justify-content:space-between}
26
+ .back-nav .logo{font-size:1.25rem;font-weight:700;color:var(--white)}
27
+ .back-nav .logo span{color:var(--emerald)}
28
+ .back-nav a.back{color:var(--gray);font-size:.9rem}
29
+ .back-nav a.back:hover{color:var(--white);text-decoration:none}
30
+
31
+ /* Report Container */
32
+ .report{max-width:900px;margin:40px auto;background:#fff;color:#1a1a2e;border-radius:12px;overflow:hidden;box-shadow:0 25px 80px rgba(0,0,0,.5)}
33
+
34
+ /* Report Header */
35
+ .report-header{background:linear-gradient(135deg,#0F172A 0%,#1E293B 100%);color:#fff;padding:48px;position:relative;overflow:hidden}
36
+ .report-header::after{content:'';position:absolute;top:-50%;right:-20%;width:400px;height:400px;background:radial-gradient(circle,rgba(59,130,246,.15),transparent 70%);pointer-events:none}
37
+ .report-header .logo-row{display:flex;align-items:center;gap:16px;margin-bottom:32px}
38
+ .report-header .shield{width:56px;height:56px;background:linear-gradient(135deg,var(--blue),var(--emerald));border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:1.8rem}
39
+ .report-header .logo-text{font-size:1.4rem;font-weight:700}
40
+ .report-header .logo-text span{color:var(--emerald)}
41
+ .report-header h1{font-size:2rem;font-weight:800;margin-bottom:8px;letter-spacing:-.02em}
42
+ .report-header .subtitle{color:var(--gray);font-size:1rem}
43
+ .report-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-top:28px;padding-top:24px;border-top:1px solid rgba(255,255,255,.1)}
44
+ .report-meta .meta-item label{display:block;font-size:.7rem;text-transform:uppercase;letter-spacing:.1em;color:var(--gray);margin-bottom:2px}
45
+ .report-meta .meta-item p{font-size:.95rem;font-weight:600}
46
+
47
+ /* Watermark */
48
+ .watermark{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-35deg);font-size:5rem;font-weight:900;color:rgba(239,68,68,.06);pointer-events:none;white-space:nowrap;letter-spacing:.1em;z-index:1}
49
+
50
+ /* Report Body */
51
+ .report-body{padding:48px;position:relative}
52
+
53
+ /* Section styling */
54
+ .report-body h2{font-size:1.3rem;font-weight:700;color:#0F172A;margin:36px 0 16px;padding-bottom:8px;border-bottom:2px solid #E2E8F0;display:flex;align-items:center;gap:10px}
55
+ .report-body h2:first-child{margin-top:0}
56
+ .report-body h2 .num{background:var(--blue);color:#fff;width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:.8rem;flex-shrink:0}
57
+
58
+ /* Executive Summary */
59
+ .exec-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:24px}
60
+ .score-card{text-align:center;padding:28px;border-radius:12px;border:2px solid #E2E8F0}
61
+ .score-card.main{border-color:var(--amber);background:linear-gradient(135deg,#FFFBEB,#FEF3C7)}
62
+ .score-ring{width:120px;height:120px;margin:0 auto 12px;position:relative}
63
+ .score-ring svg{transform:rotate(-90deg)}
64
+ .score-ring .value{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:2rem;font-weight:800;color:#92400E}
65
+ .score-ring .label{position:absolute;top:50%;left:50%;transform:translate(-50%,60%);font-size:.7rem;color:#92400E;font-weight:600;text-transform:uppercase}
66
+ .stat-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
67
+ .stat-box{text-align:center;padding:16px;background:#F8FAFC;border-radius:10px;border:1px solid #E2E8F0}
68
+ .stat-box .val{font-size:1.5rem;font-weight:800;color:#0F172A}
69
+ .stat-box .lbl{font-size:.75rem;color:#64748B;text-transform:uppercase;letter-spacing:.05em}
70
+
71
+ /* Risk badge */
72
+ .risk-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 16px;border-radius:20px;font-weight:700;font-size:.85rem}
73
+ .risk-moderate{background:#FEF3C7;color:#92400E}
74
+
75
+ /* Findings dashboard */
76
+ .findings-bar{margin:20px 0}
77
+ .bar-row{display:flex;align-items:center;gap:12px;margin-bottom:10px}
78
+ .bar-label{width:80px;font-size:.85rem;font-weight:600;text-align:right;flex-shrink:0}
79
+ .bar-track{flex:1;height:28px;background:#F1F5F9;border-radius:6px;overflow:hidden;position:relative}
80
+ .bar-fill{height:100%;border-radius:6px;display:flex;align-items:center;padding-left:10px;font-size:.8rem;font-weight:700;color:#fff;min-width:fit-content;transition:width .6s ease}
81
+ .bar-critical{background:linear-gradient(90deg,#DC2626,#EF4444)}
82
+ .bar-high{background:linear-gradient(90deg,#EA580C,var(--orange))}
83
+ .bar-medium{background:linear-gradient(90deg,#D97706,var(--amber))}
84
+ .bar-low{background:linear-gradient(90deg,#2563EB,var(--blue))}
85
+ .bar-count{font-size:.85rem;font-weight:600;color:#64748B;width:30px}
86
+
87
+ .trend-note{display:flex;align-items:center;gap:8px;padding:12px 16px;background:#F0FDF4;border:1px solid #BBF7D0;border-radius:8px;font-size:.9rem;color:#166534;margin-top:16px}
88
+
89
+ /* Findings table */
90
+ .finding{border:1px solid #E2E8F0;border-radius:10px;padding:20px;margin-bottom:16px;transition:box-shadow .2s}
91
+ .finding:hover{box-shadow:0 4px 12px rgba(0,0,0,.08)}
92
+ .finding-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
93
+ .finding-id{font-size:.8rem;color:#64748B;font-family:'SF Mono',Consolas,monospace}
94
+ .severity{display:inline-block;padding:3px 10px;border-radius:6px;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
95
+ .sev-critical{background:#FEE2E2;color:#991B1B}
96
+ .sev-high{background:#FFEDD5;color:#9A3412}
97
+ .sev-medium{background:#FEF3C7;color:#92400E}
98
+ .sev-low{background:#DBEAFE;color:#1E40AF}
99
+ .finding h3{font-size:1.05rem;font-weight:700;color:#0F172A;margin-bottom:8px}
100
+ .finding p{font-size:.9rem;color:#475569;margin-bottom:8px}
101
+ .finding-detail{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:.85rem}
102
+ .finding-detail dt{color:#64748B;font-weight:600}
103
+ .finding-detail dd{color:#334155}
104
+ .finding .recommendation{background:#F0FDF4;border-left:3px solid var(--emerald);padding:10px 14px;border-radius:0 6px 6px 0;margin-top:12px;font-size:.85rem;color:#166534}
105
+ .finding .owasp-ref{margin-top:8px;font-size:.8rem;color:#64748B}
106
+ .finding .owasp-ref code{background:#F1F5F9;padding:2px 6px;border-radius:4px;font-size:.75rem}
107
+
108
+ /* Recommendations */
109
+ .rec-list{counter-reset:rec}
110
+ .rec-item{display:flex;gap:14px;padding:16px;border:1px solid #E2E8F0;border-radius:10px;margin-bottom:10px}
111
+ .rec-item::before{counter-increment:rec;content:counter(rec);background:var(--blue);color:#fff;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.85rem;font-weight:700;flex-shrink:0}
112
+ .rec-item .priority{display:inline-block;font-size:.7rem;font-weight:700;padding:2px 8px;border-radius:4px;margin-bottom:4px;text-transform:uppercase}
113
+ .rec-item .p-immediate{background:#FEE2E2;color:#991B1B}
114
+ .rec-item .p-short{background:#FFEDD5;color:#9A3412}
115
+ .rec-item .p-medium{background:#DBEAFE;color:#1E40AF}
116
+ .rec-item h4{font-size:.95rem;font-weight:700;color:#0F172A;margin-bottom:4px}
117
+ .rec-item p{font-size:.85rem;color:#475569}
118
+
119
+ /* Report Footer */
120
+ .report-footer{background:#F8FAFC;border-top:2px solid #E2E8F0;padding:28px 48px;display:flex;align-items:center;justify-content:space-between;font-size:.85rem;color:#64748B}
121
+ .report-footer .logo-sm{font-weight:700;color:#0F172A}
122
+ .report-footer .logo-sm span{color:var(--emerald)}
123
+
124
+ /* Print styles */
125
+ @media print{
126
+ body{background:#fff}
127
+ .cta-banner,.back-nav{display:none}
128
+ .report{margin:0;border-radius:0;box-shadow:none;max-width:100%}
129
+ .finding{break-inside:avoid}
130
+ .report-header{-webkit-print-color-adjust:exact;print-color-adjust:exact}
131
+ }
132
+
133
+ @media(max-width:640px){
134
+ .report-body{padding:24px}
135
+ .exec-grid{grid-template-columns:1fr}
136
+ .stat-row{grid-template-columns:1fr}
137
+ .finding-detail{grid-template-columns:1fr}
138
+ .report-footer{flex-direction:column;gap:8px;text-align:center;padding:20px 24px}
139
+ .report-header{padding:32px 24px}
140
+ }
141
+ </style>
142
+ </head>
143
+ <body>
144
+
145
+ <!-- CTA Banner -->
146
+ <div class="cta-banner">
147
+ <span>📋 This is a sample report.</span> Get your free security assessment → <a href="mailto:hello@clawmoat.com">Contact us</a>
148
+ </div>
149
+
150
+ <!-- Back Nav -->
151
+ <div class="back-nav">
152
+ <div class="inner">
153
+ <div class="logo"><a href="/"><img src="/logo.svg" alt="ClawMoat" style="height:44px"></a></div>
154
+ <a href="/" class="back">← Back to ClawMoat</a>
155
+ </div>
156
+ </div>
157
+
158
+ <!-- Report Document -->
159
+ <div class="report">
160
+ <div class="watermark">SAMPLE</div>
161
+
162
+ <!-- Report Header -->
163
+ <div class="report-header">
164
+ <div class="logo-row">
165
+ <div class="shield">🏰</div>
166
+ <div>
167
+ <div class="logo-text">Claw<span>Moat</span> Enterprise</div>
168
+ </div>
169
+ </div>
170
+ <h1>AI Agent Security Assessment</h1>
171
+ <p class="subtitle">Comprehensive runtime security audit report</p>
172
+ <div class="report-meta">
173
+ <div class="meta-item">
174
+ <label>Client</label>
175
+ <p>Acme AI Corp</p>
176
+ </div>
177
+ <div class="meta-item">
178
+ <label>Assessment ID</label>
179
+ <p>CMA-2026-00847</p>
180
+ </div>
181
+ <div class="meta-item">
182
+ <label>Report Date</label>
183
+ <p>February 1, 2026</p>
184
+ </div>
185
+ <div class="meta-item">
186
+ <label>Assessment Period</label>
187
+ <p>Jan 1 – 31, 2026</p>
188
+ </div>
189
+ </div>
190
+ </div>
191
+
192
+ <!-- Report Body -->
193
+ <div class="report-body">
194
+
195
+ <!-- Executive Summary -->
196
+ <h2><span class="num">1</span> Executive Summary</h2>
197
+ <div class="exec-grid">
198
+ <div class="score-card main">
199
+ <div class="score-ring">
200
+ <svg width="120" height="120" viewBox="0 0 120 120">
201
+ <circle cx="60" cy="60" r="52" fill="none" stroke="#E2E8F0" stroke-width="10"/>
202
+ <circle cx="60" cy="60" r="52" fill="none" stroke="#F59E0B" stroke-width="10"
203
+ stroke-dasharray="326.7" stroke-dashoffset="88.2" stroke-linecap="round"/>
204
+ </svg>
205
+ <div class="value">73</div>
206
+ <div class="label">/ 100</div>
207
+ </div>
208
+ <p style="font-weight:700;color:#92400E;margin-top:8px">Overall Security Score</p>
209
+ </div>
210
+ <div style="display:flex;flex-direction:column;gap:12px;justify-content:center">
211
+ <div class="stat-box">
212
+ <div style="margin-bottom:4px"><span class="risk-badge risk-moderate">⚠ MODERATE</span></div>
213
+ <div class="lbl">Risk Level</div>
214
+ </div>
215
+ <div class="stat-box">
216
+ <div class="val">1,247</div>
217
+ <div class="lbl">Messages Analyzed</div>
218
+ </div>
219
+ <div class="stat-box">
220
+ <div class="val">46</div>
221
+ <div class="lbl">Total Findings</div>
222
+ </div>
223
+ </div>
224
+ </div>
225
+
226
+ <!-- Findings Dashboard -->
227
+ <h2><span class="num">2</span> Findings Dashboard</h2>
228
+ <div class="findings-bar">
229
+ <div class="bar-row">
230
+ <div class="bar-label" style="color:#DC2626">Critical</div>
231
+ <div class="bar-track"><div class="bar-fill bar-critical" style="width:6.5%">3</div></div>
232
+ </div>
233
+ <div class="bar-row">
234
+ <div class="bar-label" style="color:#EA580C">High</div>
235
+ <div class="bar-track"><div class="bar-fill bar-high" style="width:15.2%">7</div></div>
236
+ </div>
237
+ <div class="bar-row">
238
+ <div class="bar-label" style="color:#D97706">Medium</div>
239
+ <div class="bar-track"><div class="bar-fill bar-medium" style="width:26%">12</div></div>
240
+ </div>
241
+ <div class="bar-row">
242
+ <div class="bar-label" style="color:#2563EB">Low</div>
243
+ <div class="bar-track"><div class="bar-fill bar-low" style="width:52%">24</div></div>
244
+ </div>
245
+ </div>
246
+ <div class="trend-note">📈 <strong>Improving:</strong>&nbsp;Total findings decreased 18% compared to previous month (56 → 46)</div>
247
+
248
+ <!-- Top Findings -->
249
+ <h2><span class="num">3</span> Top Findings</h2>
250
+
251
+ <div class="finding">
252
+ <div class="finding-header">
253
+ <div>
254
+ <span class="finding-id">CM-2026-001</span>
255
+ <span class="severity sev-critical">Critical</span>
256
+ </div>
257
+ </div>
258
+ <h3>Prompt Injection Detected in Customer Support Agent</h3>
259
+ <p>Malicious instructions embedded in a customer email successfully redirected the support agent to disclose internal knowledge base content and override its conversation policy.</p>
260
+ <div class="finding-detail">
261
+ <dt>Affected Component</dt><dd>Customer Support Agent (cs-agent-prod-01)</dd>
262
+ <dt>Detection Layer</dt><dd>ML Classifier (confidence: 0.96)</dd>
263
+ </div>
264
+ <div class="recommendation">💡 <strong>Recommendation:</strong> Enable ClawMoat's three-layer scan pipeline on all inbound customer messages. Add input sanitization before agent context injection.</div>
265
+ <div class="owasp-ref">OWASP Ref: <code>ASI01 — Agent Goal Hijack</code></div>
266
+ </div>
267
+
268
+ <div class="finding">
269
+ <div class="finding-header">
270
+ <div>
271
+ <span class="finding-id">CM-2026-002</span>
272
+ <span class="severity sev-critical">Critical</span>
273
+ </div>
274
+ </div>
275
+ <h3>AWS Access Key Leaked in Debug Response</h3>
276
+ <p>An agent debug mode response included a full AWS access key (AKIA...) and secret key in a tool output that was relayed to the end user in a chat session.</p>
277
+ <div class="finding-detail">
278
+ <dt>Affected Component</dt><dd>DevOps Agent (devops-agent-02)</dd>
279
+ <dt>Detection Layer</dt><dd>Secret Scanner (regex + entropy)</dd>
280
+ </div>
281
+ <div class="recommendation">💡 <strong>Recommendation:</strong> Enable outbound secret scanning on all agent responses. Rotate the exposed AWS credentials immediately. Disable debug mode in production.</div>
282
+ <div class="owasp-ref">OWASP Ref: <code>ASI06 — Data Leakage</code></div>
283
+ </div>
284
+
285
+ <div class="finding">
286
+ <div class="finding-header">
287
+ <div>
288
+ <span class="finding-id">CM-2026-003</span>
289
+ <span class="severity sev-critical">Critical</span>
290
+ </div>
291
+ </div>
292
+ <h3>System Prompt Extraction Attempt Succeeded</h3>
293
+ <p>A user used multi-turn jailbreak techniques to extract the full system prompt from the sales assistant agent, revealing internal business logic and API endpoint details.</p>
294
+ <div class="finding-detail">
295
+ <dt>Affected Component</dt><dd>Sales Assistant (sales-agent-prod)</dd>
296
+ <dt>Detection Layer</dt><dd>LLM Judge (multi-turn analysis)</dd>
297
+ </div>
298
+ <div class="recommendation">💡 <strong>Recommendation:</strong> Enable jailbreak detection with multi-turn context analysis. Move sensitive business logic out of system prompts into server-side code.</div>
299
+ <div class="owasp-ref">OWASP Ref: <code>ASI01 — Agent Goal Hijack</code></div>
300
+ </div>
301
+
302
+ <div class="finding">
303
+ <div class="finding-header">
304
+ <div>
305
+ <span class="finding-id">CM-2026-004</span>
306
+ <span class="severity sev-high">High</span>
307
+ </div>
308
+ </div>
309
+ <h3>PII (SSN) Included in Agent Context Window</h3>
310
+ <p>Social Security Numbers from a connected CRM database were loaded into the agent's context window without masking, creating risk of PII exposure in responses or logs.</p>
311
+ <div class="finding-detail">
312
+ <dt>Affected Component</dt><dd>HR Assistant Agent (hr-agent-01)</dd>
313
+ <dt>Detection Layer</dt><dd>PII Scanner (pattern match)</dd>
314
+ </div>
315
+ <div class="recommendation">💡 <strong>Recommendation:</strong> Implement PII masking on all data sources before context injection. Add outbound PII scanning as a secondary safeguard.</div>
316
+ <div class="owasp-ref">OWASP Ref: <code>ASI06 — Data Leakage</code></div>
317
+ </div>
318
+
319
+ <div class="finding">
320
+ <div class="finding-header">
321
+ <div>
322
+ <span class="finding-id">CM-2026-005</span>
323
+ <span class="severity sev-high">High</span>
324
+ </div>
325
+ </div>
326
+ <h3>Excessive Tool Permissions Granted</h3>
327
+ <p>The internal coding agent has unrestricted shell access including ability to modify system files, install packages, and make network requests to arbitrary external hosts.</p>
328
+ <div class="finding-detail">
329
+ <dt>Affected Component</dt><dd>Coding Agent (code-agent-prod-03)</dd>
330
+ <dt>Detection Layer</dt><dd>Policy Engine (audit mode)</dd>
331
+ </div>
332
+ <div class="recommendation">💡 <strong>Recommendation:</strong> Apply least-privilege policies using ClawMoat's YAML policy engine. Restrict shell commands to an allowlist and block outbound network access to unknown hosts.</div>
333
+ <div class="owasp-ref">OWASP Ref: <code>ASI02 — Tool Misuse</code> / <code>ASI03 — Privilege Abuse</code></div>
334
+ </div>
335
+
336
+ <!-- Recommendations -->
337
+ <h2><span class="num">4</span> Prioritized Recommendations</h2>
338
+ <div class="rec-list">
339
+ <div class="rec-item">
340
+ <div>
341
+ <span class="priority p-immediate">Immediate</span>
342
+ <h4>Rotate Exposed AWS Credentials</h4>
343
+ <p>Immediately rotate the leaked AKIA* access key and audit CloudTrail for unauthorized usage during the exposure window.</p>
344
+ </div>
345
+ </div>
346
+ <div class="rec-item">
347
+ <div>
348
+ <span class="priority p-immediate">Immediate</span>
349
+ <h4>Enable Prompt Injection Scanning</h4>
350
+ <p>Deploy ClawMoat's three-layer scan pipeline on all customer-facing agents. Start with pattern matching (Layer 1) for instant coverage.</p>
351
+ </div>
352
+ </div>
353
+ <div class="rec-item">
354
+ <div>
355
+ <span class="priority p-short">Short-term</span>
356
+ <h4>Implement Outbound Secret Scanning</h4>
357
+ <p>Enable secret scanning on all agent responses to prevent credential leakage. Disable debug modes in production environments.</p>
358
+ </div>
359
+ </div>
360
+ <div class="rec-item">
361
+ <div>
362
+ <span class="priority p-short">Short-term</span>
363
+ <h4>Apply Least-Privilege Tool Policies</h4>
364
+ <p>Configure YAML policies for each agent restricting shell commands, file access, and network requests to only what's needed.</p>
365
+ </div>
366
+ </div>
367
+ <div class="rec-item">
368
+ <div>
369
+ <span class="priority p-medium">Medium-term</span>
370
+ <h4>Implement PII Masking Pipeline</h4>
371
+ <p>Add a data masking layer between data sources and agent context injection. Mask SSNs, credit cards, and other PII automatically.</p>
372
+ </div>
373
+ </div>
374
+ <div class="rec-item">
375
+ <div>
376
+ <span class="priority p-medium">Medium-term</span>
377
+ <h4>Move Business Logic Out of System Prompts</h4>
378
+ <p>Refactor agents to keep sensitive business rules and API details in server-side code rather than system prompts.</p>
379
+ </div>
380
+ </div>
381
+ </div>
382
+
383
+ </div>
384
+
385
+ <!-- Report Footer -->
386
+ <div class="report-footer">
387
+ <div><span class="logo-sm">🏰 Claw<span>Moat</span></span> Enterprise</div>
388
+ <div>Generated by ClawMoat Enterprise • <a href="https://clawmoat.com" style="color:#64748B">clawmoat.com</a></div>
389
+ <div>Confidential</div>
390
+ </div>
391
+ </div>
392
+
393
+ <div style="text-align:center;padding:32px;color:var(--gray);font-size:.85rem">
394
+ <a href="/" style="color:var(--blue)">← Back to ClawMoat</a> &nbsp;·&nbsp;
395
+ <a href="mailto:hello@clawmoat.com" style="color:var(--blue)">Get your free assessment</a>
396
+ </div>
397
+
398
+ </body>
399
+ </html>
package/docs/thanks.html CHANGED
@@ -1,6 +1,8 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
3
  <head>
4
+ <link rel="icon" type="image/png" href="/favicon.png">
5
+ <link rel="apple-touch-icon" href="/apple-touch-icon.png">
4
6
  <meta charset="UTF-8">
5
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
8
  <title>Welcome to ClawMoat — Thank You!</title>
@@ -0,0 +1,94 @@
1
+ # ClawMoat CI/CD Integration Examples
2
+ # Add this to your repo's .github/workflows/ directory
3
+ #
4
+ # Example 1: Scan PR diffs for prompt injection & secret leaks
5
+ # Example 2: Scan agent config files before deployment
6
+ # Example 3: Full project scan on push to main
7
+
8
+ # ─── Example 1: PR Security Scan ─────────────────────────────────
9
+ name: ClawMoat Security Scan
10
+ on:
11
+ pull_request:
12
+ branches: [main, develop]
13
+ push:
14
+ branches: [main]
15
+
16
+ permissions:
17
+ contents: read
18
+ pull-requests: write
19
+
20
+ jobs:
21
+ clawmoat-scan:
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+
26
+ - uses: actions/setup-node@v4
27
+ with:
28
+ node-version: '20'
29
+
30
+ - name: Install ClawMoat
31
+ run: npm install -g clawmoat
32
+
33
+ # Scan all text/config files for prompt injection, secrets, PII
34
+ - name: Scan for threats
35
+ run: |
36
+ echo "## 🏰 ClawMoat Security Scan" >> $GITHUB_STEP_SUMMARY
37
+
38
+ # Scan changed files in PR
39
+ if [ "${{ github.event_name }}" = "pull_request" ]; then
40
+ FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} HEAD -- '*.md' '*.yml' '*.yaml' '*.json' '*.txt' '*.env*' '*.js' '*.ts' '*.py')
41
+ else
42
+ FILES=$(find . -type f \( -name "*.md" -o -name "*.yml" -o -name "*.yaml" -o -name "*.json" -o -name "*.js" -o -name "*.ts" -o -name "*.py" \) -not -path "*/node_modules/*" -not -path "*/.git/*")
43
+ fi
44
+
45
+ FOUND_ISSUES=0
46
+ for file in $FILES; do
47
+ if [ -f "$file" ]; then
48
+ RESULT=$(clawmoat scan "$file" --format json 2>/dev/null || true)
49
+ if echo "$RESULT" | grep -q '"blocked":true'; then
50
+ echo "⛔ **BLOCKED** — $file" >> $GITHUB_STEP_SUMMARY
51
+ echo "$RESULT" | jq -r '.findings[] | " - \(.severity): \(.type)/\(.subtype)"' >> $GITHUB_STEP_SUMMARY 2>/dev/null
52
+ FOUND_ISSUES=1
53
+ fi
54
+ fi
55
+ done
56
+
57
+ if [ "$FOUND_ISSUES" = "1" ]; then
58
+ echo "" >> $GITHUB_STEP_SUMMARY
59
+ echo "❌ Security issues found. Review above findings." >> $GITHUB_STEP_SUMMARY
60
+ exit 1
61
+ else
62
+ echo "✅ No security issues found." >> $GITHUB_STEP_SUMMARY
63
+ fi
64
+
65
+ # Scan OpenClaw skills if present
66
+ - name: Scan skills (supply chain)
67
+ if: always()
68
+ run: |
69
+ if [ -d "skills/" ]; then
70
+ clawmoat audit skills/ --format summary >> $GITHUB_STEP_SUMMARY
71
+ fi
72
+
73
+ # ─── Example 2: Pre-deployment Agent Config Scan ─────────────────
74
+ # Uncomment and adapt for your deployment pipeline:
75
+ #
76
+ # deploy-scan:
77
+ # runs-on: ubuntu-latest
78
+ # steps:
79
+ # - uses: actions/checkout@v4
80
+ # - uses: actions/setup-node@v4
81
+ # with: { node-version: '20' }
82
+ # - run: npm install -g clawmoat
83
+ # - name: Validate agent configs
84
+ # run: |
85
+ # # Scan YAML configs for dangerous patterns
86
+ # for f in config/*.yml agents/*.yml; do
87
+ # clawmoat scan "$f" --fail-on high
88
+ # done
89
+ # - name: Scan prompts for injection
90
+ # run: |
91
+ # # Scan prompt templates
92
+ # for f in prompts/*.md prompts/*.txt; do
93
+ # clawmoat scan "$f" --fail-on critical
94
+ # done
package/logo.png ADDED
Binary file