feat(safety): add static tool script safety guard - #278
Open
xwzmonster wants to merge 1 commit into
Open
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Rook1ex
added a commit
to trpc-group/cla-database
that referenced
this pull request
Jul 31, 2026
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.
功能概述
本 PR 针对 Issue #90,实现了一套静态 Tool Script Safety Guard,主要包括:
allow、deny、needs_human_review三态决策安全决策
deny > needs_human_review > allowneeds_human_review默认阻断执行deny和needs_human_review路径下,被保护的 Tool 或 Executor 调用次数为 0该功能属于静态执行前检查机制,并不替代 Sandbox。CPU、内存、进程、文件系统、网络和权限隔离仍由底层 Executor 或 Sandbox 负责。
测试与验收结果
tests/safety:165 项测试全部通过git diff --check均通过尚未验证的内容
mkdocs build --strictZipFile.mkdir,在当前 Python 3.10.12 环境中失败已知边界
当前 Scanner 不是完整的 Python 解释器或 Bash Parser。复杂动态反射、运行时生成代码、复杂 Shell expansion、MCP Server 内部执行、MCP discovery/stdio 启动以及 Workspace
start_program不在完整覆盖范围内。Related to #90