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

推荐订阅源

Martin Fowler
Martin Fowler
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Vercel News
Vercel News
L
LangChain Blog
B
Blog RSS Feed
Y
Y Combinator Blog
IT之家
IT之家
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
V
V2EX
博客园 - 三生石上(FineUI控件)
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
阮一峰的网络日志
阮一峰的网络日志
有赞技术团队
有赞技术团队
D
Docker
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
Last Week in AI
Last Week in AI
月光博客
月光博客

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: allow safe exec secret passEnv inheritance · opencla...
steipete · 2026-05-08 · via Recent Commits to openclaw:main

@@ -347,6 +347,89 @@ describe("buildGatewayInstallPlan", () => {

347347

expect(plan.environment.OPENCLAW_SERVICE_MANAGED_ENV_KEYS).toBeUndefined();

348348

});

349349350+

it("allows safe inherited passEnv names while blocking dangerous exec SecretRef env", async () => {

351+

mockNodeGatewayPlanFixture({

352+

serviceEnvironment: {

353+

OPENCLAW_PORT: "3000",

354+

},

355+

});

356+357+

const warn = vi.fn();

358+

const plan = await buildGatewayInstallPlan({

359+

env: isolatedPlanEnv({

360+

BASH_ENV: "/tmp/openclaw-test-bashenv",

361+

XDG_CONFIG_HOME: "/tmp/openclaw-test-xdg-home",

362+

XDG_CONFIG_DIRS: "/etc/xdg:/opt/xdg",

363+

GH_TOKEN: "gh-test-token",

364+

AWS_ACCESS_KEY_ID: "aws-access-key",

365+

DOCKER_HOST: "tcp://docker.example.test:2376",

366+

NODE_TLS_REJECT_UNAUTHORIZED: "0",

367+

}),

368+

port: 3000,

369+

runtime: "node",

370+

warn,

371+

config: {

372+

secrets: {

373+

providers: {

374+

onepassword: {

375+

source: "exec",

376+

command: "/usr/bin/op",

377+

args: ["read", "op://Private/Discord/password"],

378+

passEnv: [

379+

"HOME",

380+

"BASH_ENV",

381+

"XDG_CONFIG_HOME",

382+

"XDG_CONFIG_DIRS",

383+

"GH_TOKEN",

384+

"AWS_ACCESS_KEY_ID",

385+

"DOCKER_HOST",

386+

"NODE_TLS_REJECT_UNAUTHORIZED",

387+

],

388+

allowInsecurePath: true,

389+

},

390+

},

391+

},

392+

channels: {

393+

discord: {

394+

token: { source: "exec", provider: "onepassword", id: "value" },

395+

},

396+

},

397+

},

398+

});

399+400+

expect(plan.environment.HOME).toBe(isolatedHome);

401+

expect(plan.environment.BASH_ENV).toBeUndefined();

402+

expect(plan.environment.XDG_CONFIG_HOME).toBeUndefined();

403+

expect(plan.environment.XDG_CONFIG_DIRS).toBeUndefined();

404+

expect(plan.environment.GH_TOKEN).toBeUndefined();

405+

expect(plan.environment.AWS_ACCESS_KEY_ID).toBeUndefined();

406+

expect(plan.environment.DOCKER_HOST).toBeUndefined();

407+

expect(plan.environment.NODE_TLS_REJECT_UNAUTHORIZED).toBeUndefined();

408+

expect(warn).not.toHaveBeenCalledWith(

409+

'Exec SecretRef passEnv ref "HOME" blocked by host-env security policy',

410+

"Config SecretRef",

411+

);

412+

expect(warn).toHaveBeenCalledWith(

413+

expect.stringContaining("XDG_CONFIG_HOME"),

414+

"Config SecretRef",

415+

);

416+

expect(warn).toHaveBeenCalledWith(

417+

expect.stringContaining("XDG_CONFIG_DIRS"),

418+

"Config SecretRef",

419+

);

420+

expect(warn).toHaveBeenCalledWith(expect.stringContaining("BASH_ENV"), "Config SecretRef");

421+

expect(warn).toHaveBeenCalledWith(expect.stringContaining("GH_TOKEN"), "Config SecretRef");

422+

expect(warn).toHaveBeenCalledWith(

423+

expect.stringContaining("AWS_ACCESS_KEY_ID"),

424+

"Config SecretRef",

425+

);

426+

expect(warn).toHaveBeenCalledWith(expect.stringContaining("DOCKER_HOST"), "Config SecretRef");

427+

expect(warn).toHaveBeenCalledWith(

428+

expect.stringContaining("NODE_TLS_REJECT_UNAUTHORIZED"),

429+

"Config SecretRef",

430+

);

431+

});

432+350433

it("does not include passEnv values for unused exec SecretRef providers", async () => {

351434

mockNodeGatewayPlanFixture({

352435

serviceEnvironment: {