fix(agents): validate shell snapshots with trusted env · openclaw/openclaw@988ec02
vincentkoc
·
2026-06-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -134,6 +134,8 @@ describe("exec shell snapshots", () => {
|
134 | 134 | HOME: untrustedHome, |
135 | 135 | [EXEC_SHELL_SNAPSHOT_ENV]: "0", |
136 | 136 | OPENCLAW_STATE_DIR: untrustedStateDir, |
| 137 | +SSH_CLIENT: "127.0.0.1 1000 22", |
| 138 | +SSH_CONNECTION: "127.0.0.1 1000 127.0.0.1 22", |
137 | 139 | }, |
138 | 140 | }); |
139 | 141 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -240,7 +240,7 @@ async function validateSnapshot(
|
240 | 240 | shell: opts.shell, |
241 | 241 | shellArgs: opts.shellArgs, |
242 | 242 | cwd: opts.cwd, |
243 | | -env: opts.env, |
| 243 | +env: buildTrustedSnapshotCaptureEnv(opts.env), |
244 | 244 | command: `. ${shQuote(snapshotPath)} >/dev/null 2>&1; :`, |
245 | 245 | timeoutMs: 2_000, |
246 | 246 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。