@clawdstrike/openclaw 0.1.0 → 0.1.2
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 +4 -2
- package/clawdstrike-security.js +1 -0
- package/dist/audit/adapter-logger.d.ts +24 -0
- package/dist/audit/adapter-logger.d.ts.map +1 -0
- package/dist/audit/adapter-logger.js +42 -0
- package/dist/audit/adapter-logger.js.map +1 -0
- package/dist/classification.d.ts +41 -0
- package/dist/classification.d.ts.map +1 -0
- package/dist/classification.js +102 -0
- package/dist/classification.js.map +1 -0
- package/dist/cli/commands/policy.js +1 -1
- package/dist/cli/commands/policy.js.map +1 -1
- package/dist/e2e/openclaw-e2e.js +3 -3
- package/dist/e2e/openclaw-e2e.js.map +1 -1
- package/dist/engine-holder.d.ts +28 -0
- package/dist/engine-holder.d.ts.map +1 -0
- package/dist/engine-holder.js +38 -0
- package/dist/engine-holder.js.map +1 -0
- package/dist/guards/egress.d.ts.map +1 -1
- package/dist/guards/egress.js +20 -1
- package/dist/guards/egress.js.map +1 -1
- package/dist/guards/forbidden-path.d.ts.map +1 -1
- package/dist/guards/forbidden-path.js +6 -0
- package/dist/guards/forbidden-path.js.map +1 -1
- package/dist/guards/secret-leak.d.ts.map +1 -1
- package/dist/guards/secret-leak.js +21 -0
- package/dist/guards/secret-leak.js.map +1 -1
- package/dist/hooks/agent-bootstrap/handler.d.ts +4 -0
- package/dist/hooks/agent-bootstrap/handler.d.ts.map +1 -1
- package/dist/hooks/agent-bootstrap/handler.js +7 -7
- package/dist/hooks/agent-bootstrap/handler.js.map +1 -1
- package/dist/hooks/approval-state.d.ts +31 -0
- package/dist/hooks/approval-state.d.ts.map +1 -0
- package/dist/hooks/approval-state.js +189 -0
- package/dist/hooks/approval-state.js.map +1 -0
- package/dist/hooks/approval-utils.d.ts +5 -0
- package/dist/hooks/approval-utils.d.ts.map +1 -0
- package/dist/hooks/approval-utils.js +77 -0
- package/dist/hooks/approval-utils.js.map +1 -0
- package/dist/hooks/audit-logger/handler.d.ts +4 -0
- package/dist/hooks/audit-logger/handler.d.ts.map +1 -1
- package/dist/hooks/audit-logger/handler.js +4 -0
- package/dist/hooks/audit-logger/handler.js.map +1 -1
- package/dist/hooks/cua-bridge/handler.d.ts +57 -0
- package/dist/hooks/cua-bridge/handler.d.ts.map +1 -0
- package/dist/hooks/cua-bridge/handler.js +369 -0
- package/dist/hooks/cua-bridge/handler.js.map +1 -0
- package/dist/hooks/tool-guard/handler.d.ts +17 -2
- package/dist/hooks/tool-guard/handler.d.ts.map +1 -1
- package/dist/hooks/tool-guard/handler.js +200 -75
- package/dist/hooks/tool-guard/handler.js.map +1 -1
- package/dist/hooks/tool-preflight/handler.d.ts +34 -0
- package/dist/hooks/tool-preflight/handler.d.ts.map +1 -0
- package/dist/hooks/tool-preflight/handler.js +426 -0
- package/dist/hooks/tool-preflight/handler.js.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/openclaw-adapter.d.ts +48 -0
- package/dist/openclaw-adapter.d.ts.map +1 -0
- package/dist/openclaw-adapter.js +81 -0
- package/dist/openclaw-adapter.js.map +1 -0
- package/dist/plugin.d.ts +40 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +125 -32
- package/dist/plugin.js.map +1 -1
- package/dist/policy/engine.d.ts +5 -0
- package/dist/policy/engine.d.ts.map +1 -1
- package/dist/policy/engine.js +580 -84
- package/dist/policy/engine.js.map +1 -1
- package/dist/policy/loader.js +57 -0
- package/dist/policy/loader.js.map +1 -1
- package/dist/policy/validator.d.ts.map +1 -1
- package/dist/policy/validator.js +97 -3
- package/dist/policy/validator.js.map +1 -1
- package/dist/receipt/signer.d.ts +42 -0
- package/dist/receipt/signer.d.ts.map +1 -0
- package/dist/receipt/signer.js +134 -0
- package/dist/receipt/signer.js.map +1 -0
- package/dist/receipt/types.d.ts +50 -0
- package/dist/receipt/types.d.ts.map +1 -0
- package/dist/receipt/types.js +9 -0
- package/dist/receipt/types.js.map +1 -0
- package/dist/security-prompt.js +1 -1
- package/dist/tools/policy-check.d.ts +2 -2
- package/dist/tools/policy-check.d.ts.map +1 -1
- package/dist/tools/policy-check.js +4 -7
- package/dist/tools/policy-check.js.map +1 -1
- package/dist/translator/openclaw-translator.d.ts +31 -0
- package/dist/translator/openclaw-translator.d.ts.map +1 -0
- package/dist/translator/openclaw-translator.js +314 -0
- package/dist/translator/openclaw-translator.js.map +1 -0
- package/dist/types.d.ts +86 -170
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -1
- package/package.json +5 -3
- package/rulesets/ai-agent-minimal.yaml +25 -0
- package/rulesets/ai-agent.yaml +25 -0
package/dist/types.d.ts
CHANGED
|
@@ -2,19 +2,14 @@
|
|
|
2
2
|
* @clawdstrike/openclaw - Type Definitions
|
|
3
3
|
*
|
|
4
4
|
* Core types for the Clawdstrike security plugin for OpenClaw.
|
|
5
|
+
*
|
|
6
|
+
* Types that are structurally identical to @clawdstrike/adapter-core are
|
|
7
|
+
* re-exported from that package to maintain a single source of truth and
|
|
8
|
+
* eliminate unsafe casts between parallel definitions.
|
|
5
9
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export type Severity = 'low' | 'medium' | 'high' | 'critical';
|
|
10
|
-
/**
|
|
11
|
-
* Enforcement mode for policy evaluation
|
|
12
|
-
*/
|
|
13
|
-
export type EvaluationMode = 'deterministic' | 'advisory' | 'audit';
|
|
14
|
-
/**
|
|
15
|
-
* Log level for plugin output
|
|
16
|
-
*/
|
|
17
|
-
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
10
|
+
export type { ClawdstrikeConfig, CuaEventData, Decision, DecisionStatus, EventData, EventType, EvaluationMode, GuardToggles, LogLevel, PolicyEvent, Severity, } from '@clawdstrike/adapter-core';
|
|
11
|
+
export type { DecisionReasonCode } from '@clawdstrike/adapter-core';
|
|
12
|
+
export type { FileEventData, CommandEventData, NetworkEventData, ToolEventData, PatchEventData, SecretEventData, } from '@clawdstrike/adapter-core';
|
|
18
13
|
/**
|
|
19
14
|
* Action to take on policy violation
|
|
20
15
|
*/
|
|
@@ -23,158 +18,35 @@ export type ViolationAction = 'cancel' | 'warn' | 'isolate' | 'escalate';
|
|
|
23
18
|
* Network egress mode
|
|
24
19
|
*/
|
|
25
20
|
export type EgressMode = 'allowlist' | 'denylist' | 'open' | 'deny_all';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
* Plugin configuration schema
|
|
32
|
-
*/
|
|
33
|
-
export interface ClawdstrikeConfig {
|
|
34
|
-
/** Path to policy YAML or built-in ruleset name */
|
|
35
|
-
policy?: string;
|
|
36
|
-
/** Enforcement mode */
|
|
37
|
-
mode?: EvaluationMode;
|
|
38
|
-
/** Logging level */
|
|
39
|
-
logLevel?: LogLevel;
|
|
40
|
-
/** Guard enable/disable toggles */
|
|
41
|
-
guards?: GuardToggles;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Guard enable/disable toggles
|
|
45
|
-
*/
|
|
46
|
-
export interface GuardToggles {
|
|
47
|
-
forbidden_path?: boolean;
|
|
48
|
-
egress?: boolean;
|
|
49
|
-
secret_leak?: boolean;
|
|
50
|
-
patch_integrity?: boolean;
|
|
51
|
-
mcp_tool?: boolean;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Execution event to be evaluated by policy engine
|
|
55
|
-
*/
|
|
56
|
-
export interface PolicyEvent {
|
|
57
|
-
/** Unique event identifier */
|
|
58
|
-
eventId: string;
|
|
59
|
-
/** Event type */
|
|
60
|
-
eventType: EventType;
|
|
61
|
-
/** Event timestamp (ISO 8601) */
|
|
62
|
-
timestamp: string;
|
|
63
|
-
/** Associated session/run identifier */
|
|
64
|
-
sessionId?: string;
|
|
65
|
-
/** Event-specific data */
|
|
66
|
-
data: EventData;
|
|
67
|
-
/** Optional metadata */
|
|
68
|
-
metadata?: Record<string, unknown>;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Union type for event-specific data
|
|
72
|
-
*/
|
|
73
|
-
export type EventData = FileEventData | CommandEventData | NetworkEventData | ToolEventData | PatchEventData | SecretEventData;
|
|
74
|
-
/**
|
|
75
|
-
* File read/write event data
|
|
76
|
-
*/
|
|
77
|
-
export interface FileEventData {
|
|
78
|
-
type: 'file';
|
|
79
|
-
/** Absolute path to the file */
|
|
80
|
-
path: string;
|
|
81
|
-
/** Optional raw content (small files only; best-effort) */
|
|
82
|
-
content?: string;
|
|
83
|
-
/** Optional base64-encoded content */
|
|
84
|
-
contentBase64?: string;
|
|
85
|
-
/** Optional content hash (for write verification) */
|
|
86
|
-
contentHash?: string;
|
|
87
|
-
/** Operation type */
|
|
88
|
-
operation: 'read' | 'write';
|
|
21
|
+
export type ComputerUseMode = 'observe' | 'guardrail' | 'fail_closed';
|
|
22
|
+
export interface ComputerUseGuardConfig {
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
mode?: ComputerUseMode;
|
|
25
|
+
allowed_actions?: string[];
|
|
89
26
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/** Working directory */
|
|
100
|
-
workingDir?: string;
|
|
27
|
+
export interface RemoteDesktopSideChannelGuardConfig {
|
|
28
|
+
enabled?: boolean;
|
|
29
|
+
clipboard_enabled?: boolean;
|
|
30
|
+
file_transfer_enabled?: boolean;
|
|
31
|
+
audio_enabled?: boolean;
|
|
32
|
+
drive_mapping_enabled?: boolean;
|
|
33
|
+
printing_enabled?: boolean;
|
|
34
|
+
session_share_enabled?: boolean;
|
|
35
|
+
max_transfer_size_bytes?: number;
|
|
101
36
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
type: 'network';
|
|
107
|
-
/** Target hostname or IP */
|
|
108
|
-
host: string;
|
|
109
|
-
/** Target port */
|
|
110
|
-
port: number;
|
|
111
|
-
/** Protocol (tcp, udp, etc.) */
|
|
112
|
-
protocol?: string;
|
|
113
|
-
/** Full URL if available */
|
|
114
|
-
url?: string;
|
|
37
|
+
export interface InputInjectionCapabilityGuardConfig {
|
|
38
|
+
enabled?: boolean;
|
|
39
|
+
allowed_input_types?: string[];
|
|
40
|
+
require_postcondition_probe?: boolean;
|
|
115
41
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
toolName: string;
|
|
123
|
-
/** Tool parameters */
|
|
124
|
-
parameters: Record<string, unknown>;
|
|
125
|
-
/** Tool result (for post-execution checks) */
|
|
126
|
-
result?: string;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Patch/diff application event data
|
|
130
|
-
*/
|
|
131
|
-
export interface PatchEventData {
|
|
132
|
-
type: 'patch';
|
|
133
|
-
/** Target file path */
|
|
134
|
-
filePath: string;
|
|
135
|
-
/** Patch content (diff or full content) */
|
|
136
|
-
patchContent: string;
|
|
137
|
-
/** Optional patch hash */
|
|
138
|
-
patchHash?: string;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Secret access event data
|
|
142
|
-
*/
|
|
143
|
-
export interface SecretEventData {
|
|
144
|
-
type: 'secret';
|
|
145
|
-
/** Secret identifier or name */
|
|
146
|
-
secretName: string;
|
|
147
|
-
/** Scope (environment, file, etc.) */
|
|
148
|
-
scope: string;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Decision status for security checks.
|
|
152
|
-
* - 'allow': Operation is permitted
|
|
153
|
-
* - 'warn': Operation is permitted but flagged for review
|
|
154
|
-
* - 'deny': Operation is blocked
|
|
155
|
-
*/
|
|
156
|
-
export type DecisionStatus = 'allow' | 'warn' | 'deny';
|
|
157
|
-
/**
|
|
158
|
-
* Result of policy evaluation
|
|
159
|
-
*/
|
|
160
|
-
export interface Decision {
|
|
161
|
-
/** The decision status: 'allow', 'warn', or 'deny' */
|
|
162
|
-
status: DecisionStatus;
|
|
163
|
-
/** Whether the event is allowed @deprecated Use status === 'allow' || status === 'warn' */
|
|
164
|
-
allowed: boolean;
|
|
165
|
-
/** Whether the event is explicitly denied @deprecated Use status === 'deny' */
|
|
166
|
-
denied: boolean;
|
|
167
|
-
/** Whether to show a warning @deprecated Use status === 'warn' */
|
|
168
|
-
warn: boolean;
|
|
169
|
-
/** Reason for denial (if denied) */
|
|
170
|
-
reason?: string;
|
|
171
|
-
/** Guard that made the decision */
|
|
172
|
-
guard?: string;
|
|
173
|
-
/** Severity of the violation */
|
|
174
|
-
severity?: Severity;
|
|
175
|
-
/** Additional message */
|
|
176
|
-
message?: string;
|
|
42
|
+
import type { GuardToggles as _GuardToggles } from '@clawdstrike/adapter-core';
|
|
43
|
+
export interface PolicyGuards extends _GuardToggles {
|
|
44
|
+
custom?: unknown;
|
|
45
|
+
computer_use?: ComputerUseGuardConfig;
|
|
46
|
+
remote_desktop_side_channel?: RemoteDesktopSideChannelGuardConfig;
|
|
47
|
+
input_injection_capability?: InputInjectionCapabilityGuardConfig;
|
|
177
48
|
}
|
|
49
|
+
import type { Severity as _Severity } from '@clawdstrike/adapter-core';
|
|
178
50
|
/**
|
|
179
51
|
* Result from a single guard check
|
|
180
52
|
*/
|
|
@@ -184,12 +56,16 @@ export interface GuardResult {
|
|
|
184
56
|
/** Reason message */
|
|
185
57
|
reason?: string;
|
|
186
58
|
/** Severity (for deny) */
|
|
187
|
-
severity?:
|
|
59
|
+
severity?: _Severity;
|
|
188
60
|
/** Guard name */
|
|
189
61
|
guard: string;
|
|
190
62
|
}
|
|
191
63
|
/**
|
|
192
64
|
* Security policy configuration
|
|
65
|
+
*
|
|
66
|
+
* NOTE: This is intentionally NOT re-exported from adapter-core.
|
|
67
|
+
* adapter-core defines Policy as `Record<string, unknown>` (opaque),
|
|
68
|
+
* whereas openclaw requires a rich structured type for guard evaluation.
|
|
193
69
|
*/
|
|
194
70
|
export interface Policy {
|
|
195
71
|
/** Policy version identifier */
|
|
@@ -207,9 +83,7 @@ export interface Policy {
|
|
|
207
83
|
/** Resource limits */
|
|
208
84
|
limits?: ResourceLimits;
|
|
209
85
|
/** Guard-level toggles */
|
|
210
|
-
guards?:
|
|
211
|
-
custom?: unknown;
|
|
212
|
-
};
|
|
86
|
+
guards?: PolicyGuards;
|
|
213
87
|
/** Action to take on violation */
|
|
214
88
|
on_violation?: ViolationAction;
|
|
215
89
|
}
|
|
@@ -286,7 +160,7 @@ export interface SecretPattern {
|
|
|
286
160
|
/** Regex pattern */
|
|
287
161
|
pattern: RegExp;
|
|
288
162
|
/** Severity if detected */
|
|
289
|
-
severity:
|
|
163
|
+
severity: _Severity;
|
|
290
164
|
/** Description */
|
|
291
165
|
description: string;
|
|
292
166
|
}
|
|
@@ -299,16 +173,17 @@ export interface DangerousPattern {
|
|
|
299
173
|
/** Regex pattern */
|
|
300
174
|
pattern: RegExp;
|
|
301
175
|
/** Severity if detected */
|
|
302
|
-
severity:
|
|
176
|
+
severity: _Severity;
|
|
303
177
|
/** Description */
|
|
304
178
|
description: string;
|
|
305
179
|
}
|
|
180
|
+
import type { ClawdstrikeConfig as _ClawdstrikeConfig } from '@clawdstrike/adapter-core';
|
|
306
181
|
/**
|
|
307
182
|
* OpenClaw Plugin API interface (minimal for type safety)
|
|
308
183
|
*/
|
|
309
184
|
export interface PluginAPI {
|
|
310
185
|
/** Get plugin configuration */
|
|
311
|
-
getConfig<T =
|
|
186
|
+
getConfig<T = _ClawdstrikeConfig>(): T;
|
|
312
187
|
/** Register a tool */
|
|
313
188
|
registerTool(tool: ToolDefinition): void;
|
|
314
189
|
/** Register CLI commands */
|
|
@@ -399,15 +274,56 @@ export interface AgentBootstrapEvent {
|
|
|
399
274
|
path: string;
|
|
400
275
|
content: string;
|
|
401
276
|
}>;
|
|
402
|
-
cfg:
|
|
277
|
+
cfg: _ClawdstrikeConfig;
|
|
403
278
|
};
|
|
404
279
|
}
|
|
280
|
+
/**
|
|
281
|
+
* Hook event context for tool_call (pre-execution).
|
|
282
|
+
* Accepts both 'tool_call' (legacy) and 'before_tool_call' (v2026.2.1+).
|
|
283
|
+
*/
|
|
284
|
+
export interface ToolCallEvent {
|
|
285
|
+
type: 'tool_call' | 'before_tool_call';
|
|
286
|
+
timestamp: string;
|
|
287
|
+
context: {
|
|
288
|
+
sessionId: string;
|
|
289
|
+
toolCall: {
|
|
290
|
+
toolName: string;
|
|
291
|
+
params: Record<string, unknown>;
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
/** Set to true to block execution */
|
|
295
|
+
preventDefault: boolean;
|
|
296
|
+
/** Messages to relay to the agent */
|
|
297
|
+
messages: string[];
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Modern OpenClaw before_tool_call hook payload (v2026 runtime).
|
|
301
|
+
*/
|
|
302
|
+
export interface BeforeToolCallHookEvent {
|
|
303
|
+
toolName: string;
|
|
304
|
+
params: Record<string, unknown>;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Modern OpenClaw hook context payload.
|
|
308
|
+
*/
|
|
309
|
+
export interface OpenClawHookContext {
|
|
310
|
+
agentId?: string;
|
|
311
|
+
sessionKey?: string;
|
|
312
|
+
toolName?: string;
|
|
313
|
+
toolCallId?: string;
|
|
314
|
+
}
|
|
405
315
|
/**
|
|
406
316
|
* Generic hook event type
|
|
407
317
|
*/
|
|
408
|
-
export type HookEvent = ToolResultPersistEvent | AgentBootstrapEvent;
|
|
318
|
+
export type HookEvent = ToolResultPersistEvent | AgentBootstrapEvent | ToolCallEvent;
|
|
409
319
|
/**
|
|
410
320
|
* Hook handler function type
|
|
411
321
|
*/
|
|
412
|
-
export
|
|
322
|
+
export interface BeforeToolCallHookResult {
|
|
323
|
+
block: boolean;
|
|
324
|
+
blockReason?: string;
|
|
325
|
+
params?: Record<string, unknown>;
|
|
326
|
+
}
|
|
327
|
+
export type HookHandlerResult = void | BeforeToolCallHookResult;
|
|
328
|
+
export type HookHandler = (event: HookEvent, ctx?: OpenClawHookContext) => Promise<HookHandlerResult> | HookHandlerResult;
|
|
413
329
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,YAAY,EACV,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,SAAS,EACT,SAAS,EACT,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,QAAQ,GACT,MAAM,2BAA2B,CAAC;AAInC,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAIpE,YAAY,EACV,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,eAAe,GAChB,MAAM,2BAA2B,CAAC;AAMnC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;AAExE,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;AAEtE,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,mCAAmC;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB,CAAC,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O,CAAC,CAAC;SACjC,CAAC;KACH,CAAC;IACF,qCAAqC;IACrC,cAAc,EAAE,OAAO,CAAC;IACxB,qCAAqC;IACrC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,sBAAsB,GAAG,mBAAmB,GAAG,aAAa,CAAC;AAErF;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,wBAAwB,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG,CACxB,KAAK,EAAE,SAAS,EAChB,GAAG,CAAC,EAAE,mBAAmB,KACtB,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* @clawdstrike/openclaw - Type Definitions
|
|
3
3
|
*
|
|
4
4
|
* Core types for the Clawdstrike security plugin for OpenClaw.
|
|
5
|
+
*
|
|
6
|
+
* Types that are structurally identical to @clawdstrike/adapter-core are
|
|
7
|
+
* re-exported from that package to maintain a single source of truth and
|
|
8
|
+
* eliminate unsafe casts between parallel definitions.
|
|
5
9
|
*/
|
|
6
10
|
export {};
|
|
7
11
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clawdstrike/openclaw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Clawdstrike security plugin for OpenClaw",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"bench:json": "npm run build && OUTPUT_JSON=1 node benchmarks/policy-engine.bench.mjs"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@clawdstrike/adapter-core": "^0.1.
|
|
32
|
+
"@clawdstrike/adapter-core": "^0.1.1",
|
|
33
33
|
"@clawdstrike/policy": "^0.1.0",
|
|
34
34
|
"chalk": "^5.3.0",
|
|
35
35
|
"commander": "^14.0.3",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"vitest": "^4.0.18"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"openclaw": ">=0.
|
|
46
|
+
"openclaw": ">=2025.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
|
49
49
|
"openclaw": {
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"files": [
|
|
54
54
|
"dist",
|
|
55
55
|
"rulesets",
|
|
56
|
+
"clawdstrike-security.js",
|
|
56
57
|
"README.md"
|
|
57
58
|
],
|
|
58
59
|
"keywords": [
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
"ai-agent"
|
|
63
64
|
],
|
|
64
65
|
"license": "Apache-2.0",
|
|
66
|
+
"author": "Clawdstrike Contributors",
|
|
65
67
|
"repository": {
|
|
66
68
|
"type": "git",
|
|
67
69
|
"url": "https://github.com/backbay-labs/clawdstrike.git",
|
|
@@ -23,6 +23,31 @@ egress:
|
|
|
23
23
|
- "10.*"
|
|
24
24
|
- "192.168.*"
|
|
25
25
|
- "172.16.*"
|
|
26
|
+
- "172.17.*"
|
|
27
|
+
- "172.18.*"
|
|
28
|
+
- "172.19.*"
|
|
29
|
+
- "172.20.*"
|
|
30
|
+
- "172.21.*"
|
|
31
|
+
- "172.22.*"
|
|
32
|
+
- "172.23.*"
|
|
33
|
+
- "172.24.*"
|
|
34
|
+
- "172.25.*"
|
|
35
|
+
- "172.26.*"
|
|
36
|
+
- "172.27.*"
|
|
37
|
+
- "172.28.*"
|
|
38
|
+
- "172.29.*"
|
|
39
|
+
- "172.30.*"
|
|
40
|
+
- "172.31.*"
|
|
41
|
+
- "0.0.0.0"
|
|
42
|
+
- "[::1]"
|
|
43
|
+
- "[::0]"
|
|
44
|
+
- "::1"
|
|
45
|
+
- "::0"
|
|
46
|
+
- "169.254.*"
|
|
47
|
+
- "fe80:*"
|
|
48
|
+
- "fc00:*"
|
|
49
|
+
- "fd00:*"
|
|
50
|
+
- "fd[0-9a-f][0-9a-f]:*"
|
|
26
51
|
|
|
27
52
|
filesystem:
|
|
28
53
|
forbidden_paths:
|
package/rulesets/ai-agent.yaml
CHANGED
|
@@ -36,6 +36,31 @@ egress:
|
|
|
36
36
|
- "10.*"
|
|
37
37
|
- "192.168.*"
|
|
38
38
|
- "172.16.*"
|
|
39
|
+
- "172.17.*"
|
|
40
|
+
- "172.18.*"
|
|
41
|
+
- "172.19.*"
|
|
42
|
+
- "172.20.*"
|
|
43
|
+
- "172.21.*"
|
|
44
|
+
- "172.22.*"
|
|
45
|
+
- "172.23.*"
|
|
46
|
+
- "172.24.*"
|
|
47
|
+
- "172.25.*"
|
|
48
|
+
- "172.26.*"
|
|
49
|
+
- "172.27.*"
|
|
50
|
+
- "172.28.*"
|
|
51
|
+
- "172.29.*"
|
|
52
|
+
- "172.30.*"
|
|
53
|
+
- "172.31.*"
|
|
54
|
+
- "0.0.0.0"
|
|
55
|
+
- "[::1]"
|
|
56
|
+
- "[::0]"
|
|
57
|
+
- "::1"
|
|
58
|
+
- "::0"
|
|
59
|
+
- "169.254.*"
|
|
60
|
+
- "fe80:*"
|
|
61
|
+
- "fc00:*"
|
|
62
|
+
- "fd00:*"
|
|
63
|
+
- "fd[0-9a-f][0-9a-f]:*"
|
|
39
64
|
|
|
40
65
|
filesystem:
|
|
41
66
|
forbidden_paths:
|