diff --git a/studio/backend/routes/data_recipe/seed.py b/studio/backend/routes/data_recipe/seed.py index 76e05be954..1765550adc 100644 --- a/studio/backend/routes/data_recipe/seed.py +++ b/studio/backend/routes/data_recipe/seed.py @@ -118,6 +118,7 @@ def _build_stream_load_kwargs( "path": dataset_name, "split": split, "streaming": True, + "trust_remote_code": False, } if data_file: kwargs["data_files"] = [data_file] diff --git a/studio/backend/tests/test_data_recipe_seed.py b/studio/backend/tests/test_data_recipe_seed.py new file mode 100644 index 0000000000..601df8bbfe --- /dev/null +++ b/studio/backend/tests/test_data_recipe_seed.py @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: AGPL-3.0-only +# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0 + +from pathlib import Path + + +def test_seed_inspect_load_kwargs_disables_remote_code_execution(): + seed_route = ( + Path(__file__).resolve().parent.parent / "routes" / "data_recipe" / "seed.py" + ).read_text() + + assert '"trust_remote_code": False' in seed_route