Fix: Enforce sandbox evaluation in PythonFunction.implementation#692
Open
Rickidevs wants to merge 1 commit intogoogle:mainfrom
Open
Fix: Enforce sandbox evaluation in PythonFunction.implementation#692Rickidevs wants to merge 1 commit intogoogle:mainfrom
Rickidevs wants to merge 1 commit intogoogle:mainfrom
Conversation
Passed sandbox=True to execution.run() to prevent unintended fallback to the main process during function evaluation.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security Fix: Unsandboxed Code Execution in PythonFunction
Summary
PythonFunction.implementationwas callingexecution.run(self.source)without explicit sandbox parameter, allowing arbitrary code execution
in the main process.
Fix
Added explicit
sandbox=Trueparameter toexecution.run()call.Security Impact
Without this fix, any untrusted input processed by PythonFunction
(LLM output, MCP server responses) could execute arbitrary OS commands
in the host process — including file access, network calls, and
environment variable theft.
Note
A detailed vulnerability report including PoC has been submitted to
Google OSS VRP. PoC details are withheld pending merge to avoid
premature disclosure.
Related: [Google OSS VRP submission - pending]