Merge pull request #14703 from rragundez/code-interpreter-blacklist

feat: Blacklist modules from arbitrary code execution in code interpreter
This commit is contained in:
Tim Jaeryang Baek
2025-08-17 04:12:12 +04:00
committed by GitHub
2 changed files with 31 additions and 0 deletions
+10
View File
@@ -1857,6 +1857,16 @@ CODE_INTERPRETER_JUPYTER_TIMEOUT = PersistentConfig(
),
)
CODE_INTERPRETER_BLACKLISTED_MODULES = PersistentConfig(
"CODE_INTERPRETER_BLACKLISTED_MODULES",
"code_interpreter.blacklisted_modules",
[
library.strip()
for library in os.environ.get("CODE_INTERPRETER_BLACKLISTED_MODULES", "").split(",")
if library.strip()
],
)
DEFAULT_CODE_INTERPRETER_PROMPT = """
#### Tools Available