Repository navigation
fix: 对齐 iOS 工程遍历与实际允许目录边界 - #109
Merged
Merged
Conversation
- workspace/project 检查与保护要求源码根目录也在允许范围内 - 目录符号链接按 CLI 语义递归扫描,覆盖链接目标内部的二次外链 - 链接入口名以 .xcodeproj 结尾时按工程处理,不再依赖目标扩展名 - 忽略 CLI 不会读取的无关失效链接,必需工程文件链接仍明确报错 - 增加 workspace 父目录、目录链接、bundle 目录链接和失效链接回归测试
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.
来源
修复
2026-11-12/MCP第四轮复审/复审报告.md中的 3 项问题。修复内容
P1 workspace 父目录越界
.xcworkspace检查/保护要求源码根目录(workspace 父目录)也在--allow-root内.xcodeproj检查/保护同样要求源码根目录,因为 CLI 会读取 CocoaPods、Package.resolved 等父目录内容P1 目录链接内部二次外链
collect_ios_projects遇到目录链接时不再只校验第一层目标,而是按 CLI 的path.is_dir()语义继续递归.xcodeproj结尾时按工程处理,不再依赖目标扩展名validate_ios_bundle也会进入目录链接目标,检查目标内部的project.pbxproj、scheme 等二次链接P2 无关失效链接误阻断
.xcodeproj结尾的链接project.pbxproj/contents.xcworkspacedata失效链接仍明确报错验证
cargo fmt --all --check-D warningscargo test -p shellsmith-mcp:3 个单元测试 + 35 个集成测试通过cargo test -p shield-cli:22 passedcargo test -p shield-core:263 passed, 8 ignoredpython3 -m unittest discover -s scripts/tests:48 passedproject.pbxproj外链被拒绝Alias.xcodeproj -> bundle-no-extension按入口名识别并拒绝内部外链xcshareddata -> shared -> outside/xcschemes被拒绝unused.txt -> missing.txt不再阻断检查