Repository navigation
fix(security): make the Trivy output limit configurable and stop refusing captured reports (1.7 backport) - #1359
Merged
Merged
Conversation
scttbnsn
requested review from
ALARGECOMPANY and
biggest-littlest
as code owners
October 12, 2026 02:52
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 12, 2026
This branch was successfully deployed
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.
A scan of a large image failed with
Trivy output is too large to parse (40313952 bytes); max supported is 20971520 bytes, which blocked that container's update (#1356).Trivy output was captured up to 50 MB but refused at a separate hardcoded 20 MB when parsed, so any report between the two was collected and then thrown away.
Capture and parse now share one limit,
DD_SECURITY_TRIVY_MAXOUTPUTBYTES: 64 MB by default, 1 MB to 1 GB. It applies to both Trivy invocations (vulnerability scan and SBOM) on the command and Docker worker backends. Going over it fails with a message that names the variable, instead of the rawstdout maxBuffer length exceededorScanner worker output exceeded N bytes, and it isn't retried as transient.Backport of #1358 to the 1.7 line.
Tests cover a report between the old cap and the new default, a configured higher and lower limit for both capture and parse, the overflow message on both backends, and config validation at the bounds. The Docker worker path is tested against a mocked runtime rejection, not a real worker.