Enhance local Python executor security by blocking dunder calls by nnfrog · Pull Request #1551 · huggingface/smolagents (original) (raw)
and others added 5 commits
updating the local_python_executor to prevent execution while Python code attempt to access dunder methods. A developer can authorize a dunder method the same way as he authorizes tools, for example: custom_executor = LocalPythonExecutor([]) custom_executor.send_tools({"getattribute":"getattribute","subclasses":"subclasses"})
albertvillanova changed the title
Enhancing the local Python sandbox Enhancie local Python executor security by blocking dunder calls
albertvillanova changed the title
Enhancie local Python executor security by blocking dunder calls Enhance local Python executor security by blocking dunder calls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})