fix(settings): validate host canary integrity across sandbox backends
This commit is contained in:
1 parent
a666948509
commit
fb159257cb
3 files changed
+14
-2
No files matched your search
@@ -74,7 +74,9 @@ async def check_sandbox(config: ExecToolConfig, workspace: Path) -> SandboxCheck
|
||||
script = (
|
||||
"printf checked > inside && "
|
||||
f"! test -r {shlex.quote(str(canary))} && "
|
||||
f"! (printf changed > {shlex.quote(str(canary))})"
|
||||
# bwrap may allow writing a new file in its private tmpfs at the
|
||||
# same path. What must stay unchanged is the host-side canary.
|
||||
f"(printf changed > {shlex.quote(str(canary))} || true)"
|
||||
)
|
||||
argv = shlex.split(wrap_command(
|
||||
config.sandbox, script, str(project), str(project),
|
||||
|
||||
Reference in new issue
Block a user