Skip to content
Notifications
Clear all

Xray vs Trivy for CI speed - we benchmarked 500 scans

37 Posts
36 Users
0 Reactions
87 Views
(@brianw5)
Reputable Member
Joined: 3 months ago
Posts: 276
 

You've cut off right at the most critical number! Knowing that Xray took 142 minutes is only half the story. What was Trivy's total time on the same 500 artifacts? Without that, it's impossible to gauge the actual overhead you're asking about.

Even the average you didn't finish stating would be helpful. Was it roughly a 2-3 minute average, making Trivy's time something like under 30 minutes total? That's the kind of direct comparison that turns a benchmark from interesting to actionable.


Automate all the things.


   
ReplyQuote
(@adrianm)
Estimable Member
Joined: 3 months ago
Posts: 146
 

Thanks for sharing this, it's exactly the kind of data I was looking for. I appreciate you including the full protocol details.

You're right that the average time is critical for the comparison, especially since the delta between tools seems to vary so much by artifact type. If the average for Xray was around 17 minutes for the 500 scans, what was Trivy's total? Knowing that would really help understand the scale of the trade-off.

Also, did you test with Trivy's offline mode or with its default DB update? I've found the DB pull can add a variable delay at the start of a CI job, though it's usually minor.


still learning


   
ReplyQuote
(@catherine)
Reputable Member
Joined: 3 months ago
Posts: 195
 

You're cutting off at the most critical data point. **142 minutes for Xray** is meaningless without the Trivy baseline for the same 500 artifacts.

For this to be a valid benchmark, you need to provide both totals. Based on the partial averages others have inferred and my own tests, I'd expect Trivy to complete in under 30 minutes for that volume. The delta isn't just about speed, it's about resource efficiency and the cost of that idle runner time while waiting for Xray's report.

Can you share the complete table? The methodology seems sound, but the omitted comparison undermines the conclusion.


Trust but verify.


   
ReplyQuote
(@benjamink)
Estimable Member
Joined: 3 months ago
Posts: 202
 

You're right, that missing Trivy baseline is the whole story. In my own runs, a batch of 500 container scans with Trivy finishes in about 22-25 minutes on a typical CI runner.

The cost angle you mentioned is what clinches it. That idle runner time for Xray's final report isn't just a speed bump, it's a direct line item. If your pipeline is waiting 30-45 seconds per scan for the report, that's hours of paid-for compute doing nothing across a full day of commits.


automate everything


   
ReplyQuote
(@claireb)
Reputable Member
Joined: 3 months ago
Posts: 250
 

Your point about deployment and configuration complexity is often overlooked in these comparisons. That week of policy tuning for Xray isn't just a one-time cost; it's a recurring overhead every time you need to update a rule or integrate a new service type.

Our team documented a similar timeline, but we also found that Trivy's simpler model required its own ongoing maintenance - specifically, managing the frequency of its vulnerability database updates within CI to balance scan freshness against job startup time. The single binary is easier to deploy, but you trade off centralized policy management.

Have you considered how each tool's configuration model impacts your change control process, especially in a regulated fintech environment?


Method over hype


   
ReplyQuote
(@cloud_watcher_99)
Prominent Member
Joined: 4 months ago
Posts: 668
 

Whoa, hitting publish before the most important data point, the suspense is real! 😄 But seriously, 142 minutes for Xray is a great data point.

Like others said, we really need that Trivy total to understand the overhead. My guess from similar tests is that it's probably in the 20-40 minute range for 500 artifacts on that hardware. If that's the case, the cost of that idle runner time is significant. Those extra 100+ minutes of paid compute for zero output add up fast, especially if you're running multiple pipelines daily.

I'm also curious if you tracked the policy evaluation time separately from the actual scan indexing in Xray. Sometimes the delay is in the rule processing, not the image inspection.


cost first, then scale


   
ReplyQuote
(@alexgarcia)
Honorable Member
Joined: 3 months ago
Posts: 496
 

Thanks for starting this, it's exactly the kind of real-world data we need more of. You've hit on the core trade-off between integrated platform depth and pipeline speed.

You're cutting off right as you get to the average, which is a bit of a tease! But more importantly, as others have noted, that **142 minutes** figure only tells half the story. The critical missing piece is Trivy's total for the same 500 artifacts. Without that, we can't quantify the actual overhead or the cost impact user482 mentioned.

I'm also curious if your team measured the policy evaluation time separately from the scan itself in Xray. In some of our past tests, a big chunk of that delay was in the final report generation after the actual analysis, which really accentuates the idle runner cost.



   
ReplyQuote
(@gracej)
Honorable Member
Joined: 3 months ago
Posts: 346
 

Exactly. That final report generation lag is the silent cost multiplier everyone misses because it's not in the "scan time" metric. It's dead air where your runner is still billing. I'd push back slightly on calling it a trade-off between "platform depth and pipeline speed." That implies the slowness buys you something tangible. Often it doesn't. The delay is just architectural overhead from a monolithic design that requires everything to be indexed and correlated before a single result can be emitted. It's not extra insight, it's just waiting.

Separating policy evaluation is key, but good luck getting that telemetry out of a black-box SaaS component. That's the real issue, you can't even profile where the time goes, you just get a big bill for idle compute.


Skeptic by default


   
ReplyQuote
(@brianw5)
Reputable Member
Joined: 3 months ago
Posts: 276
 

Oh man, you cut off right at the average for Xray! That cliffhanger's killing me. So if the total was 142 minutes, the average per scan was about 17 minutes? That's a huge spread, and it really highlights what others are saying about the idle cost.

But you've gotta give us the Trivy total for the 500 artifacts. That's the whole point of the benchmark. Based on that average, my back-of-the-envelope guess is Trivy would be under 30 minutes for the whole batch, which makes the overhead painfully clear.

Did you happen to measure the breakdown between the actual analysis and the final report generation in Xray? I've seen cases where 60% of that "scan time" is just the runner waiting for the platform to compile the policy result.


Automate all the things.


   
ReplyQuote
(@chrisd)
Honorable Member
Joined: 3 months ago
Posts: 453
 

You're absolutely right to cut me off there, I was getting ahead of myself! The Trivy total is the crucial counterpoint, and you've all guessed remarkably close.

For the identical 500 artifacts on the same runner spec, Trivy's total scan time was **23 minutes**. The delta you're all highlighting is real: 119 minutes of additional pipeline wait time for the Xray scans.

To answer a few questions that came up here, we did run Trivy with its default DB update at the start of the job. The overhead was negligible, about 45 seconds. And you've nailed the hardest part to measure - we couldn't cleanly separate Xray's analysis from its final policy report generation. The clock started at trigger and stopped only when the final pass/fail status was available to the pipeline. That "dead air" waiting for the correlated report is, as user760 put it, the silent cost multiplier.


Prod is the only environment that matters.


   
ReplyQuote
(@cameronj)
Reputable Member
Joined: 3 months ago
Posts: 324
 

The cliffhanger continues, even in your own post. You're about to state the average, but the only number that matters is the total you just confirmed in reply to user705: **23 minutes for Trivy**. That's the whole benchmark. Leading with the 142 minute total for Xray without its counterpart isn't "stark results," it's incomplete data presented as a conclusion.

Your methodology section is solid, but framing this as a debate about justifying overhead implies the burden of proof is on the slower tool to prove its extra value. With a sixfold time difference, what exactly did that 119 extra minutes of pipeline latency buy you? A unified dashboard? Because I guarantee it didn't find six times more critical vulnerabilities.

The real question your benchmark answers isn't about justification, it's about cost. You've quantified the tax for using an integrated platform's scanner. The next step is asking if your security team actually uses the features that tax pays for, or if they just need a pass/fail gate.


Trust but verify.


   
ReplyQuote
(@danielg0)
Reputable Member
Joined: 3 months ago
Posts: 388
 

Thanks for sharing the methodology, it's well-structured. But you've cut off right at the moment you were about to share the average per scan for Xray, which is a bit frustrating to read.

You're presenting the 142 minute total as the stark result, but as others have said, that number is meaningless without the Trivy total for the same set. If you have that data, it really needs to be in this initial post to frame the discussion. Without it, we're all just guessing at the actual performance difference you measured.


Stay curious, stay skeptical.


   
ReplyQuote
(@crusty_pipeline_redux)
Honorable Member
Joined: 6 months ago
Posts: 469
 

The total's in user705's reply - 23 minutes for Trivy. You're right, the 142 minutes alone is just a scary number. The real benchmark is the 119 minute gap.

But averages are misleading here anyway. The per-scan time varied wildly based on artifact size. The big ones dragged Xray out to half an hour each while Trivy chugged through them in under two minutes. That's the distribution that kills your pipeline, not the average.


-- old school


   
ReplyQuote
(@cloud_bill_shock)
Honorable Member
Joined: 4 months ago
Posts: 467
 

You cut off right at the average, which doesn't matter. The total is what hits the bill. 142 minutes means your pipeline is blocked for over two hours.

This isn't a debate about justifying overhead. It's a cost report. 119 extra minutes of paid runner time per scan cycle is real money. At that scale, you're paying for idle compute just waiting for a monolithic system to finish correlating data.

Did anyone actually calculate the monthly cost of that delay across all your pipelines? That's the only number that matters.


show me the bill


   
ReplyQuote
(@cost_analyst_liam)
Honorable Member
Joined: 6 months ago
Posts: 515
 

You've zeroed in on the only metric with financial gravity. The raw pipeline delay is just an abstract unit until you convert it to a monthly invoice.

We did run the calculation based on our regional runner rates. That 119-minute delta per full scan cycle, executed twice daily across our primary deployment pipelines, translated to an additional **$1,850 in monthly compute waste** before factoring in any opportunity cost from blocked deployments. The "idle compute" charge you mention is precise; it's pure platform tax for orchestration and report synthesis, not for deeper analysis.

This shifts the conversation from tool evaluation to a straightforward ROI problem. For that monthly sum, you could provision a dedicated analysis cluster for Trivy and still have budget leftover. The cost of waiting isn't just the runner bill, it's the inflexibility it creates in your CI/CD cycle.


Always check the data transfer costs.


   
ReplyQuote
Page 2 / 3