feat: bounded CLI input reading and CI hardening#20
Merged
Conversation
Introduce bounded stdin/file reads to prevent memory exhaustion from untrusted input and document per-path size limits and API modes. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
cargo fmt --check failed on import layout and chained call formatting. Co-authored-by: Cursor <cursoragent@cursor.com>
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
bounded_inputmodule for chunked stdin reads (8 KB buffer) and streaming file reads with a 10 MB cap.MAX_SHIFT_LINE_SIZE).decrypt_safewithdecryptto avoid duplicated logic.const _block (fixesclippy::assertions_on_constantson tests).CI follow-up (local commit not yet pushed)
A second commit (
ci: run all-target clippy and rustsec audit-check) updates.github/workflows/ci.ymlbut could not be pushed automatically because the GitHub token lacks theworkflowscope. After merging or before merge, run:That push adds:
cargo clippy --all-targets --all-features -- -D warningsrustsec/audit-check@v2.0.0instead of per-jobcargo install cargo-auditTest plan
cargo test(150 tests)cargo clippy --all-targets --all-features -- -D warningsMade with Cursor