From b74177c142e46f087486d23f2f9268ed280c108c Mon Sep 17 00:00:00 2001 From: Richard Date: Fri, 25 Sep 2026 20:44:47 +0200 Subject: [PATCH] Sandbox-Test: Deskriptoren von aussen zaehlen (#654) Co-Authored-By: Claude Opus 5.5 --- tests/ClawdDotNet.Core.Tests/Sandbox/SandboxEscapeTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ClawdDotNet.Core.Tests/Sandbox/SandboxEscapeTests.cs b/tests/ClawdDotNet.Core.Tests/Sandbox/SandboxEscapeTests.cs index 34de140..d70ba60 100644 --- a/tests/ClawdDotNet.Core.Tests/Sandbox/SandboxEscapeTests.cs +++ b/tests/ClawdDotNet.Core.Tests/Sandbox/SandboxEscapeTests.cs @@ -126,7 +126,9 @@ public sealed class SandboxEscapeTests : IDisposable { using var held = File.OpenRead(_instanceSecret); // a file the main process has open - var result = await Sh("for f in /proc/$$/fd/*; do echo ${f##*/}; done"); + // Listed by a child: a shell globbing its own /proc/$$/fd opens that directory and + // would count the handle as fd 3. + var result = await Sh("ls /proc/$$/fd"); result.StandardOutput.Split('\n', StringSplitOptions.RemoveEmptyEntries).ShouldBe(["0", "1", "2"], ignoreOrder: true); }