Harden workspace and reporting security boundaries - #6
Merged
Conversation
y4ho0
marked this pull request as ready for review
August 12, 2026 18:38
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
Security findings addressed
Filesystem and workspace boundaries
git-cleaninclude_untrackedcould follow an intermediate directory symlink outside the repositorySensitive-data handling
Saved-report trust boundary
.assumezerodirectoriesDesign
HOMEandUSERPROFILE;report.redact_home = falseis rejectedVerification
Local verification on macOS/aarch64:
cargo fmt --all -- --checkcargo check --locked --all-targets --all-featurescargo clippy --locked --all-targets --all-features -- -D warningscargo test --locked --all-features— 76 unit, 20 end-to-end, and 1 release-consistency test passedcargo +1.80.0 check --locked --all-targets --all-featurescargo build --locked --release./scripts/validate-schemas.shpython3 scripts/check-docs.py— 15 bilingual document pairs and all local links passedcargo audit --no-fetch --no-yankedFinal GitHub verification for commit
86bddccae77011cd4ce3b3214c30a2e4edec8974:An initial Windows rerun exposed a Unix-only path in a regression-test fixture. The fixture was made platform-native without changing production behavior, and the complete Windows test and Release build then passed.
Compatibility and scope
aho-corasick 1.1.4, already present in the lockfile transitively, is now declared as a direct dependency for bounded multi-pattern redactionreport.redact_home = falseand single-string opaque Shell commands are now rejectedmainResidual risks
sh -cand Windows/D /S /Cwrappers are rejected conservatively中文摘要
本 PR 完成一次以安全边界为优先的 Rust 工程加固:
最终验证结果:
main,未执行合并或发布剩余风险主要是同用户 TOCTOU 竞争窗口、操作系统运行期间可见的原始参数、经过变换或分片的秘密,以及 report-v1 缺少可信 Shell 来源信息。