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

推荐订阅源

B
Blog
Microsoft Security Blog
Microsoft Security Blog
Jina AI
Jina AI
博客园 - 叶小钗
J
Java Code Geeks
博客园 - 聂微东
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
美团技术团队
WordPress大学
WordPress大学
M
MIT News - Artificial intelligence
雷峰网
雷峰网
酷 壳 – CoolShell
酷 壳 – CoolShell
GbyAI
GbyAI
罗磊的独立博客
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
T
Tailwind CSS Blog
The Cloudflare Blog
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
小众软件
小众软件

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
docs: document sandbox path tests · openclaw/openclaw@58f...
steipete · 2026-06-05 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Verifies sandbox config merge precedence across global, agent, and shared scopes.

12

import { describe, expect, it } from "vitest";

23

import {

34

resolveSandboxBrowserConfig,

@@ -60,6 +61,7 @@ describe("sandbox config merges", () => {

6061

});

6162
6263

it("resolves docker binds and shared-scope override behavior", () => {

64+

// Shared scope intentionally ignores agent-specific Docker overrides.

6365

for (const scenario of [

6466

{

6567

name: "merges sandbox docker binds (global + agent combined)",

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Verifies sandbox media path admission for workspace, tmp, managed, and remote sources.

12

import fs from "node:fs/promises";

23

import os from "node:os";

34

import path from "node:path";

@@ -7,6 +8,7 @@ import { resolvePreferredOpenClawTmpDir } from "../infra/tmp-openclaw-dir.js";

78

import { resolveAllowedManagedMediaPath, resolveSandboxedMediaSource } from "./sandbox-paths.js";

89
910

async function withSandboxRoot<T>(run: (sandboxDir: string) => Promise<T>) {

11+

// Real temp roots exercise path normalization and symlink/hardlink behavior.

1012

const sandboxDir = await fs.mkdtemp(path.join(os.tmpdir(), "sandbox-media-"));

1113

try {

1214

return await run(sandboxDir);

@@ -49,6 +51,7 @@ async function withOutsideHardlinkInOpenClawTmp<T>(

4951

},

5052

run: (paths: { hardlinkPath: string; symlinkPath?: string }) => Promise<T>,

5153

): Promise<void> {

54+

// Hardlinks in allowed temp roots must still be rejected when inode points outside.

5255

const outsideDir = await fs.mkdtemp(path.join(process.cwd(), "sandbox-media-hardlink-outside-"));

5356

const outsideFile = path.join(outsideDir, "outside-secret.txt");

5457

const hardlinkPath = path.join(params.openClawTmpDir, makeTmpProbePath(params.hardlinkPrefix));

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Verifies Windows drive-letter paths are treated as absolute under POSIX hosts.

12

import path from "node:path";

23

import { describe, expect, it } from "vitest";

34

import { resolveToolPathAgainstWorkspaceRoot } from "./agent-tools.read.js";

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Verifies sandbox tool allow/deny policy extraction and additive alsoAllow behavior.

12

import { describe, expect, it } from "vitest";

23

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

34

import { resolveEffectiveToolPolicy } from "./agent-tools.policy.js";

@@ -33,6 +34,7 @@ describe("pickSandboxToolPolicy", () => {

3334

});

3435
3536

it("preserves allow-all semantics for allow: [] plus alsoAllow", () => {

37+

// Empty allow means allow-all; alsoAllow remains additive, not restrictive.

3638

expect(

3739

pickSandboxToolPolicy({

3840

allow: [],

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Verifies sandbox context resolution, backend registration, and main-session bypass.

12

import fs from "node:fs/promises";

23

import os from "node:os";

34

import path from "node:path";

@@ -49,6 +50,7 @@ let sandboxFixtureRoot = "";

4950

let sandboxFixtureCount = 0;

5051
5152

async function createSandboxFixtureDir(prefix: string): Promise<string> {

53+

// Shared fixture root avoids repeated temp-dir setup across sandbox context cases.

5254

const dir = path.join(sandboxFixtureRoot, `${prefix}-${sandboxFixtureCount++}`);

5355

await fs.mkdir(dir, { recursive: true });

5456

return dir;

@@ -102,6 +104,7 @@ describe("resolveSandboxContext", () => {

102104

}, 15_000);

103105
104106

it("does not touch sandbox backends for cron or sub-agent sessions when sandbox mode is off", async () => {

107+

// Mode=off should short-circuit before resolving any backend implementation.

105108

const backendFactory = vi.fn(async () => ({

106109

id: "test-off-backend",

107110

runtimeId: "unexpected-runtime",

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Verifies prompt literals and data blocks strip control/spoofing characters.

12

import { describe, expect, it } from "vitest";

23

import {

34

sanitizeForPromptLiteral,