From 7ee6993c7d7844feb56265f8f44cb3358db0b648 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 13:46:29 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/tests/test_sandbox_runtime_backstop.py | 6 +++++- studio/backend/tests/test_sandbox_tools.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/studio/backend/tests/test_sandbox_runtime_backstop.py b/studio/backend/tests/test_sandbox_runtime_backstop.py index c20fab5c73..4f6f27bfc5 100644 --- a/studio/backend/tests/test_sandbox_runtime_backstop.py +++ b/studio/backend/tests/test_sandbox_runtime_backstop.py @@ -694,7 +694,11 @@ def test_sandboxed_pyc_only_workdir_module_import_denied(): session = "backstop-workdir-pyc" workdir = get_sandbox_workdir(session) src = "import os\nos.system('echo PWNED_PYC')\n" - pyc = importlib.util.MAGIC_NUMBER + (b"\x00" * 12) + marshal.dumps(compile(src, "evilpyc.py", "exec")) + pyc = ( + importlib.util.MAGIC_NUMBER + + (b"\x00" * 12) + + marshal.dumps(compile(src, "evilpyc.py", "exec")) + ) target = os.path.join(workdir, "evilpyc.pyc") with open(target, "wb") as f: f.write(pyc) diff --git a/studio/backend/tests/test_sandbox_tools.py b/studio/backend/tests/test_sandbox_tools.py index 72dabba410..a8d655d372 100644 --- a/studio/backend/tests/test_sandbox_tools.py +++ b/studio/backend/tests/test_sandbox_tools.py @@ -4162,7 +4162,7 @@ class TestRound39Bypasses: "code", [ # A $() / backtick substitution runs inside DOUBLE quotes, so a reader payload leaks. - 'import os\nos.system(\'echo "$(cat /etc/passwd)"\')', + "import os\nos.system('echo \"$(cat /etc/passwd)\"')", "import os\nos.system('echo \"`cat /etc/passwd`\"')", ], )