Why use delta scans
Your code keeps changing after a Deep Scan, and each change makes part of your attack surface map out of date. A full Deep Scan refreshes everything, but it also rechecks code that has not changed. A delta scan rechecks files changed since the latest complete full or delta scan, plus mapped points that are stale or were never verified.- Pay for the work done. Cost depends on the changed files and the stale or unverified points that need rechecking, usually much less than a full scan.
- Keep coverage current between full scans. Findings in changed files are rechecked and the map is updated with the scanâs results.
- Scan on your terms. Run a delta when you need one, or choose whether a delta starts after a number of commits, after a number of days, or when verified coverage drops below a target.
Before you begin
- Use CodeRabbit Cloud with delta scans enabled for your organization. Delta scans donât require a particular plan or continuous coverage. If you donât see the Delta scan option, delta scans arenât enabled for your organization yet.
- Start with a complete full Deep Scan of the whole repository from the last 30 days. Partial scans and scans of selected directories donât count. If the repository has an attack surface map, its verified coverage must be at least 15%.
- Running a delta scan requires the same access as a full Deep Scan. Setting up delta automation requires Security write access.
Run a delta scan
1
Open the scan dialog
Go to Security, click Run deep scan, and select the repository.
2
Choose Delta scan
Under Scan type, Delta scan is selected when itâs available, with the repositoryâs verified coverage and the number of points that need a check. If it isnât available, the option says why, for example that the repository needs a complete full scan first.
3
Start the scan
Review the estimate and click Start scan.
Set up delta scans
Delta automation is available only for GitHub repositories. See Supported providers. Each repository uses one trigger. A delta scan starts after a merge to the default branch once:- Commits since last scan: the chosen number of commits landed since the last complete scan. Merge commits count.
- Days since last scan: the chosen number of days, from 1 to 29, passed since the last complete scan.
- Coverage is below: verified coverage is below your target, from 16% to 100%.
1
Open delta automation
Go to Security > Repositories and select the repository. On the attack surface overview, select Set up delta scans. You can also click Run deep scan and select Automate delta scans in the Delta scan option.
2
Choose a trigger
Under Start a delta scan when, choose Commits since last scan, Days since last scan, or Coverage is below, then enter the number of commits, the number of days, or the coverage target.
3
Turn on automation
Review the estimated cost per scan and select Turn on automation.
When the trigger is checked
CodeRabbit checks the trigger after each merge to the default branch. If the repository has no merges, nothing is checked and no delta scan starts, even after the chosen number of days. A day trigger starts its scan at the first merge after that many days have passed. Failed and partial scans donât reset the commit or day count. A scan runs only when the trigger is reached and the scan and billing requirements are met. Automation normally runs a delta scan. When its trigger is reached, it starts a full Deep Scan instead if verified coverage is below 15%, the repository has no complete full scan to build on, or a delta since the baseline was refused because too many files changed. The full scan follows normal full-scan billing. The delta per-scan spend limit does not apply, but credit, usage-billing, and organization monthly-cap requirements still apply. Other unmet requirements, such as a full baseline more than 30 days old, start no scan and add nothing to Scan history. Delta scans become available again after a complete full Deep Scan meets the requirements in Before you begin.Automation after an incomplete scan
When an automated delta reaches its per-scan spend limit, later triggers can start another scan, subject to scan and billing requirements. Each scan is charged for the work it performs. You can also select Continue scan to finish the incomplete scan or raise the limit for later delta scans.Turn off automation
Open delta automation, switch Delta scans off, and select Turn off automation. Turning automation off requires Security delete access.When a delta canât run
A manually requested delta does not become a full scan. If the repository doesnât meet the requirements in Before you begin, the Delta scan option is unavailable and nothing starts. Automation can start a full scan in the coverage and refusal cases described in When the trigger is checked. A delta that has started stops before it checks any code if more than 40% of the source files included by your scan settings were added or modified since its baseline, or if CodeRabbit canât compare the code with the baseline, for example because the baseline commit is no longer available. Scan history shows the scan as failed with âThis delta scan canât run. Run a full scan instead.â You arenât charged for it. Run a full Deep Scan.Billing and results
You pay for the work the delta scan performs. To start a delta, your credits must cover the full-scan estimate, or a billing admin must have approved usage billing and the estimate must fit your monthly limit. CodeRabbit returns whatever the delta does not use. When a billing admin turns on or saves the automation, its scans use credits first, then usage billing. Automation that someone else turned on runs on credits only, so it starts only when credits cover the full-scan estimate. Later edits by others keep the approval a billing admin already gave, unless they replace the automation with a full-scan schedule. See Security usage and limits. To cap each automated delta scan, turn on Set up a spend limit in delta automation. The limit canât be lower than $10 or the full-scan estimate. A scan that reaches the limit stops early and shows Budget reached in Scan history. If a saved limit falls below the current full-scan estimate, billed delta scans donât start until you raise it. Scans covered by a free allowance still run and stop at the limit. Track results in Security > Scan history. Delta scans have a Delta badge, and each automated delta scan shows the trigger that started it: Commit automation, Day automation, or Coverage automation. A delta rechecks findings in the files it scans. Its scan page shows findings from the delta and the scans it builds on, back to the last full scan. The Security > Findings list shows a deltaâs new findings after the next full Deep Scan.Whatâs next
Attack surface
Understand verified coverage and stale points.
Steer Deep Scans
Configure source scope, context, and instructions.