cargo-audit: cap input size for audit bin#1516
cargo-audit: cap input size for audit bin#1516glaziermag wants to merge 2 commits intorustsec:mainfrom
Conversation
f23f87d to
e4aea4d
Compare
| #[arg( | ||
| long = "audit-data-size-limit", | ||
| value_name = "BYTES", | ||
| help = "Maximum audit data size in bytes to parse (default: 8MB)" |
There was a problem hiding this comment.
It says here there is a default limit, but I don't see that being enforced in the changes from this PR. Am I missing something?
If you're up for it, It would be nice to add these two values in two separate commits.
|
Ah, you're totally right about the default limit—that's pretty confusing on my end! The 8MB default is actually enforced upstream inside To make things explicitly clear for anyone reading the code, I've updated the PR to enforce the 8MB fallback on the Thanks so much for the thorough review! Let me know if you spot anything else or if this looks okay now. |
e4aea4d to
1f6c99a
Compare
Hi all — per feedback on the fork PR, I’ve moved this upstream and squashed to a single commit. This implements the input-size cap for
cargo audit bin(plus an explicit regression test for oversized inputs) and keeps the existing auditable payload-size limit behavior, now optionally overrideable via CLI.If you’d prefer a different default cap value or flag naming/semantics (e.g.,
0meaning unlimited), I’m happy to adjust.Summary
cargo audit binflags to bound binary input size and auditable payload parsingTries to address #740.
Test plan