Dependency reviews in your CI
The depdelta command runs in your CI on every change that updates a dependency, from Renovate or anyone, and posts what breaks: breaking changes, security fixes, removed APIs and where your code uses them.
Free while in beta. Works alongside Renovate. On GitHub? Use the GitHub app
What a review looks like
How it works
- 1Make an API keyIn Settings, signed in. Store it in your CI's secrets as DEPDELTA_API_KEY.
- 2Add one job to CIIt runs depdelta on every change. Changes that touch no manifest or lockfile finish at once.
- 3DepDelta posts the reviewA message on the Gerrit patch set, or one comment on the merge or pull request, kept up to date.
Set it up
docker pull ghcr.io/mbobiosio/depdelta-cli:latest
# or
pip install depdelta-cliRun it in the job the Gerrit Trigger plugin starts on patchset-created. The trigger sets the change, project and patch set; the review is posted as a message on the patch set, with no vote.
pipeline {
agent { docker { image 'ghcr.io/mbobiosio/depdelta-cli:latest' } }
stages {
stage('DepDelta') {
steps {
withCredentials([
string(credentialsId: 'depdelta-api-key', variable: 'DEPDELTA_API_KEY'),
usernamePassword(credentialsId: 'gerrit-http',
usernameVariable: 'GERRIT_HTTP_USER',
passwordVariable: 'GERRIT_HTTP_PASSWORD'),
]) {
// A DepDelta outage shouldn't fail the build.
catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') {
sh 'depdelta'
}
}
}
}
}
}DEPDELTA_API_KEY- Your API key, from Settings.
GERRIT_HTTP_USER- The Gerrit account that posts (a service account works best).
GERRIT_HTTP_PASSWORD- That account's HTTP password, from its Gerrit settings.
What leaves your CI
The command is open source (MIT): read the code on GitHub. The privacy policy has the details.
Options
--fail-on breaking- Exit 1 when an update is breaking (or review, unknown, safe and riskier), to fail the job.
--wait 300- Seconds to wait for release notes DepDelta hasn't read yet. After that the review posts as it stands.
--print- Print the review instead of posting it.
--base REV --head REV- Review any two commits, outside CI: depdelta --base origin/main --head HEAD.
--format text- Plain text (Gerrit's default), markdown (GitLab's and Forgejo's) or commonmark (Bitbucket's and Azure DevOps').
Exit status: 0 posted (or nothing to review), 1 the --fail-on verdict was met or .depdelta.yml blocks new install-time code, 2 it couldn't review or post.
Install scripts
Reviews flag packages that newly run code when installed: a new package with an install script, or an update that gains one. Packages that always had one, like esbuild, aren't news. Add a .depdelta.yml at the repository root to choose how much that matters.
install_scripts: warn # off | warn (default) | block
allow_install_scripts: # never flagged
- esbuild
- sharpwarn- The default. Each package that newly runs code at install is flagged in the review.
block- Flagged too, and the GitHub check asks for action; from CI, depdelta exits 1 so the job fails. Until the package is allowed or removed.
off- Install-time code is left out of the review. Lockfile counts and new dependencies still show.
An npm install script, a pnpm build step, a Python package built from source (no wheel), a Composer plugin, or a Cargo build script. Read at the change's head commit. A file DepDelta can't read falls back to the defaults, and the review says why.
Questions
Which ecosystems does it review?
npm, PyPI, Maven, Composer, Cargo, RubyGems, pub.dev, NuGet, Go. Finding where your code uses removed or changed APIs works for npm packages that ship types, PyPI packages, Maven packages, Composer packages, gems, pub packages, NuGet packages and Go modules, in TypeScript, JavaScript, Python, Java, Kotlin, PHP, Ruby, Dart, C# and Go.
Does it check install scripts?
Yes. npm's package-lock, pnpm (before v9), uv, Poetry and Composer lockfiles record it. For yarn, pnpm 9, older package-locks, Pipfile.lock and Cargo.lock, DepDelta asks the registry about the packages a change adds or updates, up to 50 per review, and says how many it checked. RubyGems and pub aren't checked yet, and the review says so rather than staying silent. Go, Gradle and NuGet run no code at install.
Does it vote on Gerrit changes?
No. It only posts a message, tagged autogenerated so Gerrit folds older patch sets' reviews away, and notifies only the change owner. To stop merges on breaking updates, use --fail-on breaking and let your own verification job vote.
What does it need on the CI machine?
The Docker image has everything. Without Docker: Python 3.11 or newer and git; the command has no other dependencies. A shallow clone is fine: it fetches the commit it compares from when it's missing.
How many reviews can a key make?
240 an hour, waiting on release notes included. Revoke a key in Settings and CI using it stops at once.
What about GitHub, or another host?
On GitHub, the GitHub app does this with no CI job. Elsewhere, depdelta --base and --head --print prints the review for any two commits, to post however you like.
What does it cost?
Nothing while DepDelta is in beta.