-
Notifications
You must be signed in to change notification settings - Fork 0
Harden ls builtin: symlink safety, entry limits, pentest tests #60
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
20 commits
Select commit
Hold shift + click to select a range
24b8cb2
Harden ls builtin: skip symlinks in -R, add MaxDirEntries limit, add …
matt-dz aa27d8f
Address review: add clarifying comment for MaxDirEntries check
matt-dz e76efda
Address review: MaxDirEntries warning instead of hard error
matt-dz fd87034
Early-exit directory counting to prevent OOM on oversized directories
matt-dz ef74af5
Paginated ls with truncated output on oversized directories
matt-dz 00cb899
Merge branch 'main' into matt-dz/harden-ls
matt-dz aee9e01
Address review: fix negative offset crash, dot-dot limit slots, swall…
matt-dz b804c1b
Address review: cap offset at MaxDirEntries, decouple maxRead from of…
matt-dz ce6c63e
Address review: ignore --limit in recursive mode, document DoS tradeoffs
matt-dz 7689681
Address review: streaming offset for O(n) pagination, ignore paginati…
matt-dz 31e957e
Add comprehensive regression tests for ls pagination and DoS protection
matt-dz dce9a03
Remove PR review tag comments from regression tests
matt-dz 9b235fd
Add ls pagination scenario tests
matt-dz 3e8d677
Address review: sort dot entries with other entries, continue recursi…
matt-dz e66a826
Revert: keep early return after truncation, do not recurse past MaxDi…
matt-dz fef7ce1
Document intentional bash divergence: no recursion after truncation
matt-dz f151963
Address review: preserve ReadDir errors when truncation occurs
matt-dz acc7367
Extract collectDirEntries for testability, add error-during-truncatio…
matt-dz b5835fe
Fix Effective Go findings: use errors.Is for EOF, pre-allocate slice
matt-dz 2f2887e
format files
matt-dz 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
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.