FastGPT icon indicating copy to clipboard operation
FastGPT copied to clipboard

feat: Python3 Sandbox

Open dogfar opened this issue 8 months ago • 3 comments

提供了一个Python 3运行沙盒环境,能够在代码节点运行Python 3代码。效果如下:

Example

dogfar avatar Mar 02 '25 04:03 dogfar

CLA assistant check
All committers have signed the CLA.

cla-assistant[bot] avatar Mar 02 '25 04:03 cla-assistant[bot]

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

cla-assistant[bot] avatar Mar 02 '25 04:03 cla-assistant[bot]

🤖 Generated by deploy action

📦 Preview Image: ghcr.io/labring/fastgpt-pr:3530b374a1beeed433e3981db6ffe32c956e2fdc

c121914yu avatar Mar 02 '25 04:03 c121914yu

感谢你的提交,有几个安全问题需要检查:

  1. 网络请求(需要禁止
  2. cpu/内存 限制
  3. 超时强制终止
  4. 全局变量/环境变量泄露问题(沙盒里拿到主线程全局数据
  5. 避免破坏主线程(比如可以 exit 退出主线程)
  6. 禁止磁盘读写

另外,看起来是装了 py 的环境,是否可以直接和现在的 sandbox 镜像合并。

c121914yu avatar Mar 10 '25 04:03 c121914yu

❌ Rebase test pr failed: Error: Pull request labring/FastGPT#3944 is not created by gru-agent[bot]

gru-agent[bot] avatar Mar 12 '25 09:03 gru-agent[bot]