-
-
Notifications
You must be signed in to change notification settings - Fork 19
feat: option to prevent cross-filesystem traversal #363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
9600176
fix(api): skip mounted directories by comparing device IDs
claude 02edc48
refactor(api): use pub(crate) visibility for device_id items
claude 7b4889d
docs(readme): remove outdated mounted filesystems limitation
claude ab0aae8
feat(cli): add -x/--one-file-system flag to skip mounted directories
claude e7df5d8
chore(cli): regenerate completions, help text, and usage docs
claude ad79436
fix(one-file-system): return UnsupportedFeature error on non-unix pla…
claude 3f7db4b
docs(cli): hide `-x` on windows
KSXGitHub 184872b
fix(cli): remove redundant visible_alias for --one-file-system
claude 81414f6
test(one-file-system): add unit and integration tests for -x flag
claude e7aed33
fix(test): gate platform-specific tests with target_os
claude 33f096e
refactor(test): improve one_file_system test style
claude f7d1405
refactor(test): replace brittle section parsing with NUL-delimited ou…
claude 1518b5e
Merge origin/master into claude/fix-mounted-directories-pEvuV
claude b21eea3
chore(git): merge from master
claude a168848
test(one-file-system): fail loudly when unshare is unavailable
claude e6702a9
fix(test): probe tmpfs mount in unshare availability check
claude 51af07b
refactor(test): return Result<(), String> from unshare_available
claude d81a960
refactor(test): replace `unshare` with `fuse2fs` for cross-device test
claude 2c0e4ba
chore(git): merge from master
claude a33c417
ci(test): install FUSE dependencies for cross-device test
claude 6506aa3
ci(test): add fuse2fs package to FUSE dependency installation
claude 02d93a5
refactor(test): return probe results from fuse_probe instead of disca…
claude 18b0d06
fix(test): use fakeroot option for fuse2fs mount
claude a535b40
chore(git): merge from master
claude c931b42
refactor(test): replace fuse2fs with squashfuse for cross-device test
claude bbbef2a
ci: update FUSE dependencies from e2fsprogs to squashfs-tools
claude 1af976d
fix(ci): add apt update and use generic error messages
claude f3a73e0
refactor(test): improve FUSE probe and cleanup in cross-device test
claude d0690c4
chore(git): merge from master
claude 17a7c1d
fix(test): replace fixed sleep with exponential backoff for FUSE mount
claude 43e80b9
refactor(test): use cfg_attr(ignore) for cross-device test skipping
claude 2582245
test: remove the `cfg`
KSXGitHub b8fc756
refactor: unify `use`
KSXGitHub 9dc7465
refactor: use `with_arg`
KSXGitHub e653d9b
docs: remove some useless comments
KSXGitHub 884bca2
refactor(test): use long flags and full tree comparison in cross-devi…
claude 368f1ff
fix(test): match root name between CLI output and expected tree
claude 1d064d2
refactor: reduce verbose control flow into clever iterator chain
KSXGitHub 0b57e7e
refactor: stop qualifying
KSXGitHub 5cc4cf2
refactor: reduce allocation, reduce import
KSXGitHub 175f73d
refactor: rename some variables
KSXGitHub c763557
test(one-file-system): add contains assertions and FuseMount document…
claude 90f9e20
docs(test): fix inaccurate skip description in cross-device test
claude 1a9b4b6
docs(ci): document external test dependencies and clean up CI steps
claude e4fe9f4
docs: generalize skip flag references and fix fuse_probe doc
claude bf6ee32
docs: convert external dependencies table to bullet list
claude 9e1e135
refactor: trim docs and include retry count in poll message
claude 4c5bad0
refactor(test): use pipe to inline conditional arg in method chain
claude ddd221f
refactor: simplify conditional argument addition
KSXGitHub d066ce2
ci(devcontainer): expose FUSE device and install test dependencies
claude ee76a99
ci(devcontainer): skip FUSE and fs-error tests in Codespaces
claude be7c805
ci(devcontainer): only skip cross-device test, not fs-errors
claude f422c66
fix: preserve directory size on read_dir failure and strengthen FUSE …
claude 9d8c235
chore(git): merge from master
claude d516699
chore(git): merge from master
claude 60de739
docs(contributing): fix stale test-skip references
claude b0abbaa
refactor(app): move `one_file_system` between `hardlinks_handler` and…
claude 66dbe59
refactor(fs_tree_builder): simplify visibility of device_id items to …
claude 1729ef4
refactor: replace `one_file_system: bool` with `DeviceBoundary` enum
claude 4863a60
refactor: arguments should stay together
KSXGitHub 6c6cfe4
refactor: stop taking `bool`
KSXGitHub b48921b
refactor: use `pipe`
KSXGitHub 15768f6
refactor(args): move `one_file_system` between `deduplicate_hardlinks…
claude 876739a
chore(git): merge from master
claude 4744905
feat(cli): set conflict
KSXGitHub 27c740c
fix: completions
KSXGitHub 077cbf0
test: set `--min-ratio`
KSXGitHub 4e6f084
refactor(device): rename `from_1fs` to `from_one_file_system`
claude 8b06f9e
refactor: reduce verbosity
KSXGitHub 88c7d8d
refactor: use pipe
KSXGitHub 30f37bc
refactor: rename some variables
KSXGitHub 52d95d7
docs: remove the obvious error message
KSXGitHub cfddd52
style: add an empty line
KSXGitHub File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,3 +91,4 @@ maplit = "1.0.2" | |
| normalize-path = "0.2.1" | ||
| pretty_assertions = "1.4.1" | ||
| rand = "0.10.0" | ||
| which = "8.0.2" | ||
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
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| /// Whether to cross device boundary into a different filesystem. | ||
| #[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
| pub enum DeviceBoundary { | ||
| Cross, | ||
| Stay, | ||
| } | ||
|
|
||
| impl DeviceBoundary { | ||
| /// Derive device boundary from `--one-file-system`. | ||
| #[cfg(feature = "cli")] | ||
| pub(crate) fn from_one_file_system(one_file_system: bool) -> Self { | ||
| match one_file_system { | ||
| false => DeviceBoundary::Cross, | ||
| true => DeviceBoundary::Stay, | ||
| } | ||
| } | ||
|
KSXGitHub marked this conversation as resolved.
|
||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.