Skip to content

fix(security): make the Trivy output limit configurable and stop refusing captured reports (1.7 backport) - #1359

Merged
scttbnsn merged 4 commits into
dev/v1.7from
fix/v1.7-trivy-output-limit
Oct 12, 2026
Merged

scttbnsn merged 4 commits into
dev/v1.7from
fix/v1.7-trivy-output-limit

Conversation

@scttbnsn

Copy link
Copy Markdown
Contributor

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 raw stdout maxBuffer length exceeded or Scanner 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.

@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
drydock-website Ready Ready Preview Oct 12, 2026 2:53am UTC
drydockdemo-website Ready Ready Preview Oct 12, 2026 2:53am UTC

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: CodesWhat/drydock/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 89b880fc-3282-483b-97ca-3c48726a6430

📥 Commits

Reviewing files that changed from the base of the PR and between 3223836 and 581d393.


⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !CHANGELOG.md

📒 Files selected for processing (5)
  • app/configuration/index.test.ts
  • app/configuration/index.ts
  • app/security/scan.test.ts
  • app/security/scan.ts
  • content/docs/current/configuration/security/index.mdx

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttbnsn
scttbnsn merged commit d3960a2 into dev/v1.7 Oct 12, 2026
@scttbnsn
scttbnsn deleted the fix/v1.7-trivy-output-limit branch October 12, 2026 03:18

This branch was successfully deployed

2 active deployments
Preview – drydock-website — 581d393a Deployed Oct 12, 2026 by vercel[bot]
Preview – drydockdemo-website — 581d393a Deployed Oct 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant