You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Local Safe Code Executor with docker and output file capturing support #3075
** Please make sure you read the contribution guide and file the issues in the right place. ** Contribution guide.
Is your feature request related to a problem? Please describe.
As someone using ADK in corporate environments, I am surprised to see the UnSafeLocalCodeExecutor is only a exec tool, I think it is possible to make it more robust for a lot of usecases.
Describe the solution you'd like
I'd like to the current implementation more robust so that gives us a secure and isolated space to run our code. Here are my 2 ideas for how making it work:
Better Process Handling:
Running in a Sub-process: It could run code in a separate child process. That way, it's isolated from the main ADK tool process, and we can cleanly capture all the output (stdout, stderr) and exit codes without worrying about it interfering with anything else.
Docker Integration: For total isolation, it would be amazing if it could run code inside a Docker container. We could point it to a Dockerfile or a pre-built image, ensuring the environment is always clean and consistent, just like in our CI/CD pipelines.
Capturing Generated Files:
It would also be super helpful if the executor could grab files created during a run, like logs or reports. Maybe we could tell it which files or folders to look for, and it would pull them out of the execution environment for us to inspect.
Describe alternatives you've considered
Adding security checks to current execs just seems more like a band-aid, this could be something that over time may be developed or repurposed for other use cases. I also considered a VM but that is definitely an overkill
@AlexFierro9 Thank you for reporting this. I understand the request is currently under review. Please keep me posted if anything else is needed. Thanks for your patience.
closing as a duplicate of #5302, which asks for the part still missing: ContainerCodeExecutor copying input files in and generated files back out. a pull request for it is open in #5321. the other two asks exist today. ContainerCodeExecutor runs code in docker from a prebuilt image or a Dockerfile path, and UnsafeLocalCodeExecutor runs each program in its own child python process and reports stdout, stderr and the exit code, 2.9.2 included. open a new issue if you want us to look at it again.
Activity
AlexFierro9 commentedon Oct 11, 2025
Hey Guys anything? can I be assigned to this if the other maintainers are busy? @seanzhou1023 @boyangsvl
boyangsvl commentedon Oct 15, 2025
I've assigned the issue to you @AlexFierro9 , thank you for the contribution!
AlexFierro9 commentedon Oct 20, 2025
#3225
klateefa commentedon Nov 26, 2025
@AlexFierro9 Thank you for reporting this. I understand the request is currently under review. Please keep me posted if anything else is needed. Thanks for your patience.
GWeale commentedon Sep 22, 2026
closing as a duplicate of #5302, which asks for the part still missing: ContainerCodeExecutor copying input files in and generated files back out. a pull request for it is open in #5321. the other two asks exist today. ContainerCodeExecutor runs code in docker from a prebuilt image or a Dockerfile path, and UnsafeLocalCodeExecutor runs each program in its own child python process and reports stdout, stderr and the exit code, 2.9.2 included. open a new issue if you want us to look at it again.