@poolzin/pool-bot 2026.3.17 → 2026.3.18
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/CHANGELOG.md +56 -0
- package/dist/agents/tools/web-fetch.js +1 -1
- package/dist/build-info.json +2 -2
- package/dist/commands/skills-openclaw.command.js +123 -0
- package/dist/config/paths.js +7 -0
- package/dist/infra/net/fetch-guard.js +191 -146
- package/dist/media/fetch.js +83 -112
- package/dist/media/inbound-path-policy.js +90 -97
- package/dist/media/read-response-with-limit.js +49 -26
- package/dist/media-understanding/attachments.js +1 -1
- package/dist/plugin-sdk/audio.js +7 -0
- package/dist/plugin-sdk/bluebubbles.js +7 -0
- package/dist/plugin-sdk/browser.js +7 -0
- package/dist/plugin-sdk/canvas.js +7 -0
- package/dist/plugin-sdk/cron.js +7 -0
- package/dist/plugin-sdk/discord-actions.js +6 -0
- package/dist/plugin-sdk/discord.js +7 -0
- package/dist/plugin-sdk/image.js +7 -0
- package/dist/plugin-sdk/imessage.js +6 -0
- package/dist/plugin-sdk/keyed-async-queue.js +35 -0
- package/dist/plugin-sdk/media.js +8 -0
- package/dist/plugin-sdk/memory.js +7 -0
- package/dist/plugin-sdk/pdf.js +7 -0
- package/dist/plugin-sdk/sessions.js +7 -0
- package/dist/plugin-sdk/signal.js +6 -0
- package/dist/plugin-sdk/slack-actions.js +7 -0
- package/dist/plugin-sdk/slack.js +7 -0
- package/dist/plugin-sdk/telegram-actions.js +6 -0
- package/dist/plugin-sdk/telegram.js +6 -0
- package/dist/plugin-sdk/test-utils.js +110 -0
- package/dist/plugin-sdk/tts.js +7 -0
- package/dist/plugin-sdk/whatsapp.js +6 -0
- package/dist/providers/github-copilot-auth.js +53 -76
- package/dist/providers/github-copilot-models.js +63 -35
- package/dist/providers/github-copilot-token.js +46 -89
- package/dist/security/audit-findings.js +165 -0
- package/dist/security/audit.js +141 -572
- package/dist/skills/openclaw-skill-loader.js +191 -0
- package/dist/slack/monitor/media.js +2 -1
- package/docs/improvements/OPENCLAW-IMPLEMENTATION.md +45 -0
- package/docs/skills/openclaw-integration.md +295 -0
- package/docs/testing/TEST-PLAN-2026-03-13.md +338 -0
- package/extensions/acpx/package.json +19 -0
- package/extensions/acpx/poolbot.plugin.json +9 -0
- package/extensions/acpx/src/index.ts +34 -0
- package/extensions/bluebubbles/src/runtime.ts +1 -0
- package/extensions/diffs/package.json +15 -0
- package/extensions/diffs/poolbot.plugin.json +10 -0
- package/extensions/diffs/src/index.ts +106 -0
- package/extensions/discord/src/runtime.ts +1 -0
- package/extensions/feishu/src/runtime.ts +1 -0
- package/extensions/github-copilot/package.json +28 -0
- package/extensions/github-copilot/poolbot.plugin.json +29 -0
- package/extensions/github-copilot/src/index.ts +126 -0
- package/extensions/github-copilot/tsconfig.json +10 -0
- package/extensions/googlechat/src/runtime.ts +1 -0
- package/extensions/imessage/src/runtime.ts +1 -0
- package/extensions/irc/src/runtime.ts +1 -0
- package/extensions/line/src/runtime.ts +1 -0
- package/extensions/matrix/src/runtime.ts +1 -0
- package/extensions/mattermost/src/mattermost/monitor-helpers.ts +10 -1
- package/extensions/mattermost/src/runtime.ts +6 -3
- package/extensions/msteams/src/runtime.ts +1 -0
- package/extensions/nextcloud-talk/src/runtime.ts +1 -0
- package/extensions/nostr/src/runtime.ts +5 -2
- package/extensions/ollama/package.json +20 -0
- package/extensions/ollama/poolbot.plugin.json +14 -0
- package/extensions/ollama/src/index.ts +95 -0
- package/extensions/sglang/package.json +18 -0
- package/extensions/sglang/poolbot.plugin.json +13 -0
- package/extensions/sglang/src/index.ts +62 -0
- package/extensions/signal/src/runtime.ts +1 -0
- package/extensions/slack/src/runtime.ts +1 -0
- package/extensions/telegram/src/runtime.ts +1 -0
- package/extensions/test-utils/package.json +17 -0
- package/extensions/test-utils/poolbot.plugin.json +16 -0
- package/extensions/test-utils/src/index.ts +220 -0
- package/extensions/tlon/src/runtime.ts +1 -0
- package/extensions/twitch/src/runtime.ts +1 -0
- package/extensions/vllm/package.json +19 -0
- package/extensions/vllm/poolbot.plugin.json +13 -0
- package/extensions/vllm/src/index.ts +90 -0
- package/extensions/whatsapp/src/runtime.ts +1 -0
- package/extensions/zalo/src/runtime.ts +1 -0
- package/extensions/zalouser/src/runtime.ts +1 -0
- package/package.json +77 -3
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security Audit Findings Collection
|
|
3
|
+
*
|
|
4
|
+
* Collects security findings from various audit checks
|
|
5
|
+
*/
|
|
6
|
+
export async function collectSecurityAuditFindings(options) {
|
|
7
|
+
const findings = [];
|
|
8
|
+
// Config security checks
|
|
9
|
+
findings.push(...checkConfigSecurity(options.config));
|
|
10
|
+
// Gateway security checks
|
|
11
|
+
findings.push(...checkGatewaySecurity(options.config));
|
|
12
|
+
// Channel security checks (DM policies, allowlists)
|
|
13
|
+
if (options.includeChannelSecurity) {
|
|
14
|
+
findings.push(...checkChannelSecurity(options.config));
|
|
15
|
+
}
|
|
16
|
+
// Model security checks
|
|
17
|
+
findings.push(...checkModelSecurity(options.config));
|
|
18
|
+
// Filesystem checks (if enabled)
|
|
19
|
+
if (options.includeFilesystem) {
|
|
20
|
+
findings.push(...checkFilesystemSecurity(options));
|
|
21
|
+
}
|
|
22
|
+
return findings;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Check configuration file security
|
|
26
|
+
*/
|
|
27
|
+
function checkConfigSecurity(config) {
|
|
28
|
+
const findings = [];
|
|
29
|
+
// Check for secrets in config
|
|
30
|
+
const configStr = JSON.stringify(config);
|
|
31
|
+
const secretPatterns = [
|
|
32
|
+
{ pattern: /sk-[a-zA-Z0-9]{32,}/g, name: "API Key" },
|
|
33
|
+
{ pattern: /Bearer [a-zA-Z0-9\-_]+\.[a-zA-Z0-9\-_]+\.[a-zA-Z0-9\-_]+/g, name: "JWT Token" },
|
|
34
|
+
{ pattern: /ghp_[a-zA-Z0-9]{36}/g, name: "GitHub Token" },
|
|
35
|
+
];
|
|
36
|
+
for (const { pattern, name } of secretPatterns) {
|
|
37
|
+
if (pattern.test(configStr)) {
|
|
38
|
+
findings.push({
|
|
39
|
+
checkId: "CFG-001",
|
|
40
|
+
severity: "critical",
|
|
41
|
+
title: `${name} found in configuration`,
|
|
42
|
+
detail: `Potential ${name} detected in config file. Secrets should be stored in environment variables or secrets manager.`,
|
|
43
|
+
remediation: "Move secrets to environment variables or use a secrets manager",
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return findings;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check gateway security configuration
|
|
51
|
+
*/
|
|
52
|
+
function checkGatewaySecurity(config) {
|
|
53
|
+
const findings = [];
|
|
54
|
+
const gateway = config.gateway;
|
|
55
|
+
if (!gateway)
|
|
56
|
+
return findings;
|
|
57
|
+
// Check for loopback binding
|
|
58
|
+
const host = gateway.host ?? "127.0.0.1";
|
|
59
|
+
if (host === "0.0.0.0" || host === "::") {
|
|
60
|
+
findings.push({
|
|
61
|
+
checkId: "GTW-001",
|
|
62
|
+
severity: "warn",
|
|
63
|
+
title: "Gateway bound to all interfaces",
|
|
64
|
+
detail: `Gateway is bound to ${host}, making it accessible from any network interface.`,
|
|
65
|
+
remediation: "Bind gateway to 127.0.0.1 or use a firewall to restrict access",
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return findings;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Check channel security (DM policies, allowlists)
|
|
72
|
+
*/
|
|
73
|
+
function checkChannelSecurity(config) {
|
|
74
|
+
const findings = [];
|
|
75
|
+
const channels = config.channels;
|
|
76
|
+
if (!channels)
|
|
77
|
+
return findings;
|
|
78
|
+
// Check Telegram DM policy
|
|
79
|
+
const telegram = channels.telegram;
|
|
80
|
+
if (telegram && telegram.dmPolicy === "open") {
|
|
81
|
+
findings.push({
|
|
82
|
+
checkId: "CHN-001",
|
|
83
|
+
severity: "warn",
|
|
84
|
+
title: "Telegram DM policy is 'open'",
|
|
85
|
+
detail: "Telegram allows messages from any user without pairing. This may expose the bot to spam or abuse.",
|
|
86
|
+
remediation: "Set 'channels.telegram.dmPolicy' to 'pairing' for unknown senders",
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
// Check Discord DM policy
|
|
90
|
+
const discord = channels.discord;
|
|
91
|
+
if (discord && discord.dmPolicy === "open") {
|
|
92
|
+
findings.push({
|
|
93
|
+
checkId: "CHN-002",
|
|
94
|
+
severity: "warn",
|
|
95
|
+
title: "Discord DM policy is 'open'",
|
|
96
|
+
detail: "Discord allows DMs from any user without pairing.",
|
|
97
|
+
remediation: "Set 'channels.discord.dmPolicy' to 'pairing' for unknown senders",
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
// Check for overly permissive allowFrom
|
|
101
|
+
const checkAllowFrom = (channelName, allowFrom) => {
|
|
102
|
+
if (allowFrom?.includes("*") || allowFrom?.includes("*")) {
|
|
103
|
+
findings.push({
|
|
104
|
+
checkId: "CHN-003",
|
|
105
|
+
severity: "warn",
|
|
106
|
+
title: `${channelName} allows messages from anyone`,
|
|
107
|
+
detail: `The ${channelName} channel has '*' in allowFrom, allowing messages from any user.`,
|
|
108
|
+
remediation: `Remove '*' from allowFrom and specify allowed users`,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
if (telegram?.allowFrom)
|
|
113
|
+
checkAllowFrom("Telegram", telegram.allowFrom);
|
|
114
|
+
if (discord?.allowFrom)
|
|
115
|
+
checkAllowFrom("Discord", discord.allowFrom);
|
|
116
|
+
return findings;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Check model security configuration
|
|
120
|
+
*/
|
|
121
|
+
function checkModelSecurity(config) {
|
|
122
|
+
const findings = [];
|
|
123
|
+
const models = config.models;
|
|
124
|
+
if (!models)
|
|
125
|
+
return findings;
|
|
126
|
+
// Check for model without fallback
|
|
127
|
+
const modelsRecord = models;
|
|
128
|
+
if (!modelsRecord.fallbacks || modelsRecord.fallbacks.length === 0) {
|
|
129
|
+
findings.push({
|
|
130
|
+
checkId: "MDL-001",
|
|
131
|
+
severity: "info",
|
|
132
|
+
title: "No model fallback configured",
|
|
133
|
+
detail: "No fallback models configured. If primary model fails, requests will fail.",
|
|
134
|
+
remediation: "Add fallback models in 'models.fallbacks'",
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return findings;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Check filesystem security (deep audit)
|
|
141
|
+
*/
|
|
142
|
+
function checkFilesystemSecurity(options) {
|
|
143
|
+
const findings = [];
|
|
144
|
+
// Check state directory permissions (Unix only)
|
|
145
|
+
if (options.platform !== "win32") {
|
|
146
|
+
findings.push({
|
|
147
|
+
checkId: "FS-001",
|
|
148
|
+
severity: "info",
|
|
149
|
+
title: "Filesystem audit check",
|
|
150
|
+
detail: `State directory: ${options.stateDir}`,
|
|
151
|
+
remediation: "Ensure state directory has restrictive permissions (chmod 700)",
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
// Check for world-readable config
|
|
155
|
+
if (options.includeFilesystem) {
|
|
156
|
+
findings.push({
|
|
157
|
+
checkId: "FS-002",
|
|
158
|
+
severity: "info",
|
|
159
|
+
title: "Config file accessibility check",
|
|
160
|
+
detail: `Config file: ${options.configPath}`,
|
|
161
|
+
remediation: "Ensure config file has restrictive permissions (chmod 600)",
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
return findings;
|
|
165
|
+
}
|