Safeguard
Developer Tools•

How fast must CI security checks be? A time budget for feedback

DORA says CI tests should return in minutes. A practical time budget for security checks in CI, and what to move out of the main path when they run long.

Safeguard Security Team
4 min read

Keep security checks that run on every commit within a few minutes, in line with DORA's guidance that CI tests give feedback in a few minutes. Anything slower should move to a scheduled or pre-release job, so developers keep getting fast answers and do not learn to ignore the check.

What DORA says about CI speed

DORA's continuous integration page says each commit should trigger a build and a series of automated tests that provide feedback in a few minutes. It says unit tests must run in a few minutes or less, because if they take longer developers will not run them often, and failures then come from many changes at once, which makes debugging harder. It also lists an agreement that fixing a broken build takes priority over other work.

Security checks live in the same pipeline, so the same reasoning applies.

A practical budget

DORA does not set a number for security checks, so choose one with your team. A workable approach:

StageTargetContents
On every push or pull requestA few minutes total, shared with testsDependency advisory check, policy and license check, incremental static analysis
On merge to trunkA few minutesSame as above plus build artifact checks
Nightly or scheduledLonger is fineFull static analysis, container image scan, rescan of all dependencies against new advisories
Pre-releaseWithin release windowDynamic testing, deeper review of high-risk changes

How to find out where the time goes

  1. Record the duration of each pipeline step for two weeks.
  2. Calculate the median and the slowest 10 percent for each security step.
  3. Mark any step that is slower than the unit tests combined.
  4. Check what share of that time is setup, such as downloading databases, versus analysis.
  5. Cache what you can, and scope analysis to changed files where the tool supports it.

What to move out of the main path

Move a check out if it is slow and its findings are rarely about the current change. Whole-repository analysis is a typical example, since most findings predate the pull request. Keep the diff-scoped result in the path and show the rest as backlog.

Do not hide the cost

A check moved to a schedule must have an owner and a report. Otherwise slow checks become silent checks. Show the age of the last full scan per service, and alert if it goes stale.

Signs the budget is broken

  • Developers rerun failed security jobs until they pass.
  • Branches get longer, since people avoid triggering the pipeline.
  • Overrides rise on busy days.

Each one points to slow or noisy checks, and each undermines the small-batch habit DORA recommends.

Quick check

Is a ten minute security scan acceptable?

It depends on your tests and team. If it is the slowest step and developers avoid it, split it into a fast diff-scoped part and a scheduled full part.

Can a scheduled scan replace the per-commit one?

No. The per-commit check gives feedback while the change is fresh. The scheduled one catches new advisories on old code. You want both.

Try it yourself

Click through it at your own pace, or open it full screen.

Look at how little a developer has to wait to see a gate result.

How Safeguard fits

Safeguard offers dependency scanning with policies and gates for pull requests and continuous monitoring for scheduled rescans, matching the two paths above. Try a free scan at gold.safeguard.sh/scan.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.