jd-opensource / jd-opensource/JoySafeter
[BUG]
- Dominant language
- Python
- Stars
- 311
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
前置条件:
定义一个单智能体,使能deepagents模式,backend_type使用docker模式,使能了skills和tools,添加了自己的skills(skill安全审计的skill)。
操作:
选择上述定义的智能体,上传一个被测的skills.zip,同时通过提示词让智能体用skills安全审计的skill扫描上传的skills.zip有没有安全问题。
现象:
1、zip包是上传到joysafeter-backend容器的/app/data/files/{user_id}目录下面,实际也是有的。
2、sandbox里面的/workspace/skills下面也有skill安全审计的skill
3、sandbox里面没有/app/data/files/{user_id}目录,导致大模型报找不到zip文件,任务执行失败了。
问题分析:
/app/data/files/{user_id}目录为什么会在sandbox里面没有,怀疑是创建sandbox的时候没有挂在分区。
于是在sandbox_manager.py的_ensure_sandbox_running_locked方法中,把
`volumes = {host_sandbox_dir: "/workspace"}`
改成了
`volumes = {host_sandbox_dir: "/workspace", "/app/data/files/{user_id}": "/app/data/files/{user_id}"}`
然后发现sandbox里面/app/data/files/{user_id}有了,但目录下的zip文件还是没有。
Contributor guide
Assessment
This issue has not been assessed yet.