diff --git a/scripts/ci/sandboxed_web_e2e.py b/scripts/ci/sandboxed_web_e2e.py index b0376c0822..9bca4a1522 100644 --- a/scripts/ci/sandboxed_web_e2e.py +++ b/scripts/ci/sandboxed_web_e2e.py @@ -240,6 +240,7 @@ def _probe_isolation_capability(backend: str) -> None: text=True, timeout=10, check=False, + shell=False, ) except (OSError, subprocess.TimeoutExpired) as exc: raise RuntimeError(f"bubblewrap capability probe could not run: {exc}") from exc diff --git a/tests/test_sandboxed_web_e2e.py b/tests/test_sandboxed_web_e2e.py index 1b1cdf3722..5f271af383 100644 --- a/tests/test_sandboxed_web_e2e.py +++ b/tests/test_sandboxed_web_e2e.py @@ -1396,6 +1396,7 @@ def test_probe_isolation_capability_exercises_the_same_operations_as_real_comman def _fake_run(command, **kwargs): captured["command"] = command + captured["kwargs"] = kwargs return subprocess.CompletedProcess(command, 0, stdout="", stderr="") monkeypatch.setattr(sandboxed_web_e2e.subprocess, "run", _fake_run) @@ -1408,6 +1409,7 @@ def _fake_run(command, **kwargs): assert "--bind" in command assert sandboxed_web_e2e.SANDBOX_MOUNT in command assert "--chdir" in command + assert captured["kwargs"].get("shell") is False def test_probe_isolation_capability_ignores_path_shadowed_shell(monkeypatch, tmp_path): @@ -1434,6 +1436,7 @@ def test_probe_isolation_capability_ignores_path_shadowed_shell(monkeypatch, tmp def _fake_run(command, **kwargs): captured["command"] = command + captured["kwargs"] = kwargs return subprocess.CompletedProcess(command, 0, stdout="", stderr="") monkeypatch.setattr(sandboxed_web_e2e.subprocess, "run", _fake_run) @@ -1443,6 +1446,7 @@ def _fake_run(command, **kwargs): probe_executable = command[-3] assert probe_executable in sandboxed_web_e2e.PROBE_SHELL_PATHS assert probe_executable != str(shadow_sh) + assert captured["kwargs"].get("shell") is False def test_probe_shell_fails_clearly_when_no_mounted_shell_exists(monkeypatch, tmp_path):