惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
I
InfoQ
N
Netflix TechBlog - Medium
T
Tailwind CSS Blog
量子位
博客园 - 叶小钗
月光博客
月光博客
IT之家
IT之家
G
Google Developers Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
小众软件
小众软件
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
Vercel News
Vercel News
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: keep channel security checks cold · openclaw/opencla...
shakkernerd · 2026-04-26 · via Recent Commits to openclaw:main

@@ -1,7 +1,7 @@

11

import path from "node:path";

22

import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agents/agent-scope.js";

33

import { resolveSandboxConfigForAgent } from "../agents/sandbox/config.js";

4-

import type { listChannelPlugins } from "../channels/plugins/index.js";

4+

import type { ChannelPlugin } from "../channels/plugins/types.plugin.js";

55

import type { ConfigFileSnapshot, OpenClawConfig } from "../config/config.js";

66

import { resolveConfigPath, resolveStateDir } from "../config/paths.js";

77

import { type ExecApprovalsFile, loadExecApprovals } from "../infra/exec-approvals.js";

@@ -57,7 +57,7 @@ export type SecurityAuditOptions = {

5757

/** Time limit for deep gateway probe. */

5858

deepTimeoutMs?: number;

5959

/** Dependency injection for tests. */

60-

plugins?: ReturnType<typeof listChannelPlugins>;

60+

plugins?: ChannelPlugin[];

6161

/** Dependency injection for tests (Windows ACL checks). */

6262

execIcacls?: ExecFn;

6363

/** Dependency injection for tests (Docker label checks). */

@@ -88,21 +88,20 @@ export type AuditExecutionContext = {

8888

execIcacls?: ExecFn;

8989

execDockerRawFn?: ExecDockerRawFn;

9090

probeGatewayFn?: ProbeGatewayFn;

91-

plugins?: ReturnType<typeof listChannelPlugins>;

91+

plugins?: ChannelPlugin[];

9292

configSnapshot: ConfigFileSnapshot | null;

9393

codeSafetySummaryCache: Map<string, Promise<unknown>>;

9494

deepProbeAuth?: { token?: string; password?: string };

9595

workspaceDir?: string;

9696

};

979798-

let channelPluginsModulePromise: Promise<typeof import("../channels/plugins/index.js")> | undefined;

98+

let readOnlyChannelPluginsModulePromise:

99+

| Promise<typeof import("../channels/plugins/read-only.js")>

100+

| undefined;

99101

let auditNonDeepModulePromise: Promise<typeof import("./audit.nondeep.runtime.js")> | undefined;

100102

let auditChannelModulePromise:

101103

| Promise<typeof import("./audit-channel.collect.runtime.js")>

102104

| undefined;

103-

let pluginRegistryLoaderModulePromise:

104-

| Promise<typeof import("../plugins/runtime/runtime-registry-loader.js")>

105-

| undefined;

106105

let pluginMetadataRegistryLoaderModulePromise:

107106

| Promise<typeof import("../plugins/runtime/metadata-registry-loader.js")>

108107

| undefined;

@@ -122,9 +121,9 @@ let gatewayProbeDepsPromise:

122121

}>

123122

| undefined;

124123125-

async function loadChannelPlugins() {

126-

channelPluginsModulePromise ??= import("../channels/plugins/index.js");

127-

return await channelPluginsModulePromise;

124+

async function loadReadOnlyChannelPlugins() {

125+

readOnlyChannelPluginsModulePromise ??= import("../channels/plugins/read-only.js");

126+

return await readOnlyChannelPluginsModulePromise;

128127

}

129128130129

async function loadAuditNonDeepModule() {

@@ -137,11 +136,6 @@ async function loadAuditChannelModule() {

137136

return await auditChannelModulePromise;

138137

}

139138140-

async function loadPluginRegistryLoaderModule() {

141-

pluginRegistryLoaderModulePromise ??= import("../plugins/runtime/runtime-registry-loader.js");

142-

return await pluginRegistryLoaderModulePromise;

143-

}

144-145139

async function loadPluginMetadataRegistryLoaderModule() {

146140

pluginMetadataRegistryLoaderModulePromise ??=

147141

import("../plugins/runtime/metadata-registry-loader.js");

@@ -1050,16 +1044,16 @@ export async function runSecurityAudit(opts: SecurityAuditOptions): Promise<Secu

10501044

}

10511045

}

10521046

if (shouldAuditChannelSecurity) {

1053-

if (context.plugins === undefined) {

1054-

(await loadPluginRegistryLoaderModule()).ensurePluginRegistryLoaded({

1055-

scope: "configured-channels",

1056-

config: cfg,

1047+

const channelPlugins =

1048+

context.plugins ??

1049+

(await loadReadOnlyChannelPlugins()).listReadOnlyChannelPluginsForConfig(cfg, {

10571050

activationSourceConfig: context.sourceConfig,

10581051

workspaceDir: context.workspaceDir,

10591052

env,

1053+

stateDir,

1054+

includePersistedAuthState: true,

1055+

includeSetupRuntimeFallback: false,

10601056

});

1061-

}

1062-

const channelPlugins = context.plugins ?? (await loadChannelPlugins()).listChannelPlugins();

10631057

const { collectChannelSecurityFindings } = await loadAuditChannelModule();

10641058

findings.push(

10651059

...(await collectChannelSecurityFindings({