feat(security/tools): 为 file/grep/glob 接入统一结果安全过滤#157
Merged
Conversation
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.
Summary
file / grep / glob引入统一路径结果过滤器,集中处理工作区边界、敏感路径、符号链接逃逸检查。read_file在读取前接入同源过滤规则,命中策略时返回结构化阻断错误。grep与glob在候选结果阶段统一过滤,并补充统计元数据:matched_count、filtered_count、returned_count、filtered_reasons。Test
Closes #151
Refs #98