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

推荐订阅源

宝玉的分享
宝玉的分享
小众软件
小众软件
J
Java Code Geeks
I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
L
LangChain Blog
博客园 - 司徒正美
量子位
Y
Y Combinator Blog
C
Check Point Blog
T
Tailwind CSS Blog
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
A
About on SuperTechFans
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
V
V2EX
阮一峰的网络日志
阮一峰的网络日志

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(plugins): enforce install policy in wrappers (#93357)...
eleqtrizit · 2026-06-16 · via Recent Commits to openclaw:main

@@ -131,11 +131,13 @@ function readFirstMockCall(mock: unknown, label: string): unknown[] {

131131132132

type NpmPackInstallCall = {

133133

archivePath?: string;

134+

config?: OpenClawConfig;

134135

expectedPluginId?: string;

135136

trustedSourceLinkedOfficialInstall?: boolean;

136137

};

137138138139

type NpmSpecInstallCall = {

140+

config?: OpenClawConfig;

139141

expectedIntegrity?: string;

140142

expectedPluginId?: string;

141143

mode?: string;

@@ -145,6 +147,7 @@ type NpmSpecInstallCall = {

145147

};

146148147149

type ClawHubInstallCall = {

150+

config?: OpenClawConfig;

148151

expectedPluginId?: string;

149152

mode?: string;

150153

spec?: string;

@@ -313,6 +316,19 @@ describe("ensureOnboardingPluginInstalled", () => {

313316314317

it("uses a guarded npm-pack install override for the matching plugin id", async () => {

315318

const archivePath = path.resolve("tmp/demo-plugin.tgz");

319+

const cfg: OpenClawConfig = {

320+

security: {

321+

installPolicy: {

322+

enabled: true,

323+

exec: {

324+

source: "exec",

325+

command: process.execPath,

326+

args: ["-e", "process.exit(1)"],

327+

allowInsecurePath: true,

328+

},

329+

},

330+

},

331+

};

316332

process.env.OPENCLAW_ALLOW_PLUGIN_INSTALL_OVERRIDES = "1";

317333

process.env.OPENCLAW_PLUGIN_INSTALL_OVERRIDES = JSON.stringify({

318334

"other-plugin": "npm:@demo/other@1.0.0",

@@ -337,7 +353,7 @@ describe("ensureOnboardingPluginInstalled", () => {

337353338354

const select = vi.fn(async () => "npm");

339355

const result = await ensureOnboardingPluginInstalled({

340-

cfg: {},

356+

cfg,

341357

entry: {

342358

pluginId: "demo-plugin",

343359

label: "Demo Plugin",

@@ -361,6 +377,7 @@ describe("ensureOnboardingPluginInstalled", () => {

361377

"installPluginFromNpmPackArchive",

362378

) as [NpmPackInstallCall];

363379

expect(packCall.archivePath).toBe(archivePath);

380+

expect(packCall.config).toBe(cfg);

364381

expect(packCall.expectedPluginId).toBe("demo-plugin");

365382

expect(packCall).not.toHaveProperty("trustedSourceLinkedOfficialInstall");

366383

const [, recordUpdate] = readFirstMockCall(recordPluginInstall, "recordPluginInstall") as [

@@ -428,6 +445,19 @@ describe("ensureOnboardingPluginInstalled", () => {

428445

});

429446430447

it("installs and records ClawHub provider plugins with source facts", async () => {

448+

const cfg: OpenClawConfig = {

449+

security: {

450+

installPolicy: {

451+

enabled: true,

452+

exec: {

453+

source: "exec",

454+

command: process.execPath,

455+

args: ["-e", "process.exit(1)"],

456+

allowInsecurePath: true,

457+

},

458+

},

459+

},

460+

};

431461

installPluginFromClawHub.mockImplementation(async (params) => {

432462

params.logger?.info?.("Downloading demo-plugin from ClawHub…");

433463

return {

@@ -457,7 +487,7 @@ describe("ensureOnboardingPluginInstalled", () => {

457487

const update = vi.fn();

458488459489

const result = await ensureOnboardingPluginInstalled({

460-

cfg: {},

490+

cfg,

461491

entry: {

462492

pluginId: "demo-plugin",

463493

label: "Demo Provider",

@@ -479,6 +509,7 @@ describe("ensureOnboardingPluginInstalled", () => {

479509

"installPluginFromClawHub",

480510

) as [ClawHubInstallCall];

481511

expect(clawHubCall.spec).toBe("clawhub:demo-plugin@2026.5.2");

512+

expect(clawHubCall.config).toBe(cfg);

482513

expect(clawHubCall.expectedPluginId).toBe("demo-plugin");

483514

expect(clawHubCall.mode).toBe("install");

484515

expect(clawHubCall.timeoutMs).toBe(300_000);

@@ -507,6 +538,19 @@ describe("ensureOnboardingPluginInstalled", () => {

507538

});

508539509540

it("passes npm specs and optional expected integrity to npm installs with progress", async () => {

541+

const cfg: OpenClawConfig = {

542+

security: {

543+

installPolicy: {

544+

enabled: true,

545+

exec: {

546+

source: "exec",

547+

command: process.execPath,

548+

args: ["-e", "process.exit(1)"],

549+

allowInsecurePath: true,

550+

},

551+

},

552+

},

553+

};

510554

const npmResolution = {

511555

name: "@wecom/wecom-openclaw-plugin",

512556

version: "1.2.3",

@@ -538,7 +582,7 @@ describe("ensureOnboardingPluginInstalled", () => {

538582

const update = vi.fn();

539583540584

const result = await ensureOnboardingPluginInstalled({

541-

cfg: {},

585+

cfg,

542586

entry: {

543587

pluginId: "demo-plugin",

544588

label: "WeCom",

@@ -559,6 +603,7 @@ describe("ensureOnboardingPluginInstalled", () => {

559603

NpmSpecInstallCall,

560604

];

561605

expect(npmCall.spec).toBe("@wecom/wecom-openclaw-plugin@1.2.3");

606+

expect(npmCall.config).toBe(cfg);

562607

expect(npmCall.mode).toBe("update");

563608

expect(npmCall.expectedPluginId).toBe("demo-plugin");

564609

expect(npmCall.expectedIntegrity).toBe("sha512-wecom");