Repository navigation
test: feed traversal path to oot update and preclean CLI temp dirs - #63
Merged
Merged
Conversation
kridaydave
force-pushed
the
fix/pr-38-test-traversal-and-tmpdir
branch
from
November 8, 2026 18:03
c23efac to
174e2aa
Compare
…p dirs TST-02: test_update_rejects_path_traversal never passed a traversal path to oot update (its hasDotdot probe was optional and asserted git's fsck, not Oot). Rewrite it to hand-craft a tree with a ../escape.txt blob via git hash-object --literally, record it, and assert oot update refuses it without writing outside the repo. Git is now required (expect, not if let). TST-09: cli_test temp dirs now preclean remove_dir_all before create_dir_all, so a stale dir can't poison a run.
kridaydave
force-pushed
the
fix/pr-38-test-traversal-and-tmpdir
branch
from
November 8, 2026 18:53
174e2aa to
39ae93d
Compare
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.
Bugs
What was wrong
if let Ok(...)around a git fsck probe, so Oot validation never ran and missing git skipped it silently.Fix
../escape.txtblob viagit hash-object --literally, store a change record pointing at it, and assertoot update --change <id> --forcefails naming the traversal path without writing outside the repo. Git is now required via expect, not skipped.Verification
CI green (fmt, clippy, tests, release build, adjudication) + rewritten test_update_rejects_path_traversal which exercises Oot validate_tree_path end-to-end (fails if validation is disabled or the file escapes).