🤖 Dependabot's core logic for creating update PRs.
Welcome to the public home of Dependabot :dependabot:.
Dependabot-Core is the library at the heart of Dependabot security / version updates.
Use it to generate automated pull requests updating dependencies for projects written in Ruby, JavaScript, Python, PHP, Dart, Elixir, Elm, Go, Rust, Java, Julia, and .NET. It can also update git submodules, Docker files, Opentofu, Terraform files and Pre-Commit hooks. Features include:
Most people are familiar with the Dependabot service that runs on GitHub.com and GitHub Enterprise. Enabling that is as
simple as checking a dependabot.yml configuration file in to your repository's .github directory.
However, if you want to run a custom version of Dependabot or run it on another platform, you're not left out in the cold. This repo provides the logic necessary for hosting your own standalone Dependabot. It currently supports opening Pull Requests against repositories hosted on GitHub, Github Enterprise, Azure DevOps, GitLab, BitBucket, and AWS CodeCommit.
Dependabot-Core is a library, so you'll need an entrypoint script of some kind. Here are a few examples to help you get started.
Note: If you're looking to run Dependabot locally for development/debugging purposes, see the Development Guide.
The open-source Dependabot CLI is our recommended entrypoint for standalone use cases.
We use it in production here at GitHub, and advanced users can also leverage it to run a self-hosted version of Dependabot within their own projects / CI systems.
It creates dependency diffs but does not create PRs. So you will need to wire that up yourself. To aid with that, we created the example-cli-usage repo which demonstrates how to turn those diffs into actual PR's.
Alternatively, because Dependabot-Core is a Ruby library, you can write your own ruby-based wrapper that leverages the Dependabot-core code. The tricky bit is Dependabot assumes it's running in an isolated, throw-away environment so you'll need to handle all that yourself. For example protecting against security risks of arbitrary code execution exfiltrating credentials, ensuring the appropriate version of Go or Python or whatever language you need is available, and handling when Dependabot makes changes to its runtime environment.
In an environment such as GitHub where Dependabot runs in a container, if you want to change your build or installation process depending on whether it's running within the context of the Dependabot container, you can check the existence of the DEPENDABOT environment variable.
👋 Want to give us feedback on Dependabot, or contribute to it? That's great - thank you so much!
Most bug reports should be accompanied by a link to a public repository that reproduces the problem. Bug reports that cannot be reproduced on a public repo using the CLI tool or dry-run script may be closed as "cannot reproduce".
Our issue tracker is quite active, and as a result there's a good chance someone already filed the same issue. If so, please upvote that issue, because we use 👍 reactions on issues as one signal to gauge the impact of a feature request or bug.
However, please do not leave comments that contribute nothing new to the discussion. For details, see https://go.dev/wiki/NoPlusOne. This is open source, if you see something you want fixed, we are happy to coach you through contributing a pull request to fix it.
The issue-tracker is meant solely for issues related to Dependabot's updating logic. Issues about security alerts or Dependency Graph
Cargo: update-type trailer reports semver-minor for 0.y bumps that groups and ignore rules treat as major
https://github.com/dependabot/dependabot-core/issues/17132
Labels: L: github:actions, L: rust:cargo
👋 Want to give us feedback on Dependabot, or contribute to it? That's great - thank you so much!
By submitting a contribution, you agree that contribution is licensed to GitHub under the MIT license.
The Specs, ARM64 Build, and Sorbet workflows support merge_group events. When a pull request enters a merge queue,
these workflows check the combined changes on the queue's temporary commit. Specs and ARM64 Build use per-run
concurrency groups for merge groups, so repeated requests for the same ref do not replace pending runs.
The Branch images workflow publishes every ecosystem image with the merge-group SHA as its tag. The Merge group images
check passes only after matrix preparation and all image publications succeed. This check is skipped on ordinary pull
requests, where image publication still requires approval. Images for pull requests from forks must be built using the
workflow's manual dispatch.
There's a good description of the project's layout in our README's Architecture section, but if you're struggling to understand how anything works please don't hesitate to create an issue.
git blame spelunking down the road?"git bisect.If you are an ecosystem maintainer and are interested in integrating with Dependabot, and are willing to help provide the expertise necessary to build and support it, please see our new ecosystems guide for detailed information on the requirements and process.
In dependabot-core, each ecosystem implementation is in its own gem so you can use Dependabot for a language
we have not merged by creating a script to run your own gem or
fork of core, e.g. dependabot-lein-runner
We are investing more developer time directly in dependabot-core to improve our architecture so that
each ecosystem is more isolated and testable. Our goal is make it easier to create and test Dependabot extensions so there is a paved path for running additional
ecosystems in the future.
We have begun using a Stalebot action to help keep the Issues and Pull requests backlogs tidy. You can see the configuration here. If you'd like to keep an issue open after getting a stalebot warning, simply comment on it and it'll reset the clock.