[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7717":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":41,"readmeContent":42,"aiSummary":43,"trendingCount":16,"starSnapshotCount":16,"syncStatus":44,"lastSyncTime":45,"discoverSource":46},7717,"dependabot-core","dependabot\u002Fdependabot-core","dependabot","🤖 Dependabot's core logic for creating update PRs.","https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcode-security\u002Fdependabot",null,"Ruby",5641,1421,111,1179,0,4,30,66,21,40.46,"MIT License",false,"main",[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"dependencies","docker","dotnet","elixir","elm","go","java","javascript","php","pnpm","python","ruby","rubygems","rust","terraform","2026-06-12 02:01:43","\u003Ch1 align=\"center\">\n    \u003Cpicture>\n        \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F7659\u002F174594540-5e29e523-396a-465b-9a6e-6cab5b15a568.svg\">\n        \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F7659\u002F174594559-0b3ddaa7-e75b-4f10-9dee-b51431a9fd4c.svg\">\n        \u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F7659\u002F174594540-5e29e523-396a-465b-9a6e-6cab5b15a568.svg\" alt=\"Dependabot\" width=\"336\">\n    \u003C\u002Fpicture>\n\u003C\u002Fh1>\n\nWelcome to the public home of Dependabot :dependabot:.\n\n# Table of Contents\n\n- [What is Dependabot-Core?](#what-is-dependabot-core)\n- [How to run Dependabot](#how-to-run-dependabot)\n- [Contributing to Dependabot](#contributing-to-dependabot)\n  - [Reporting Issues and Feature Requests](#reporting-issues-and-feature-requests)\n  - [Submitting Pull Requests](#submitting-pull-requests)\n  - [New Ecosystems](#new-ecosystems)\n- [Development Guide](#development-guide)\n  - [Getting a Development Environment Running](#getting-a-development-environment-running)\n  - [Debugging Problems](#debugging-problems)\n  - [Running Tests](#running-tests)\n  - [Profiling](#profiling)\n- [Architecture and Code Layout](#architecture-and-code-layout)\n- [Trademarks](#trademarks)\n- [Notes for Project Maintainers](#notes-for-project-maintainers)\n\n---\n\n# What is Dependabot-Core?\n\nDependabot-Core is the library at the heart of [Dependabot](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcode-security\u002Fdependabot) security \u002F version updates.\n\nUse it to generate automated pull requests updating dependencies for projects written in Ruby, JavaScript, Python,\nPHP, Dart, Elixir, Elm, Go, Rust, Java, Julia, and .NET. It can also update git submodules, Docker files, Opentofu, Terraform files and Pre-Commit hooks.\nFeatures include:\n\n- Check for the latest version of a dependency *that's resolvable given a project's other dependencies*\n- Generate updated manifest and lockfiles for a new dependency version\n- Generate PR descriptions that include the updated dependency's changelogs, release notes, and commits\n\n# How to run Dependabot\n\nMost people are familiar with the Dependabot service that runs on GitHub.com and GitHub Enterprise. Enabling that is as\nsimple as [checking a `dependabot.yml` configuration file in to your repository's `.github` directory](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcode-security\u002Fdependabot\u002Fdependabot-version-updates\u002Fconfiguring-dependabot-version-updates).\n\nHowever, if you want to run a custom version of Dependabot or run it on another platform, you're not left out in the cold.\nThis 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.\n\nDependabot-Core is a library, so you'll need an entrypoint script of some kind. Here are a few examples to help you get\nstarted.\n\n>**Note:** If you're looking to run Dependabot locally for development\u002Fdebugging purposes, see the [Development Guide](#development-guide).\n\n## Dependabot CLI\n\nThe open-source [Dependabot CLI](https:\u002F\u002Fgithub.com\u002Fdependabot\u002Fcli) is our recommended entrypoint for standalone use cases.\n\nWe 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 \u002F CI systems.\n\nIt creates dependency diffs but does not create PRs. So you will need to wire that up yourself.\nTo aid with that, we created the [example-cli-usage](https:\u002F\u002Fgithub.com\u002Fdependabot\u002Fexample-cli-usage) repo which demonstrates how to turn those diffs into actual PR's.\n\n## Write your own Ruby-based tool\n\nAlternatively, 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.\n\n## Dependabot on CI\n\nIn 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.\n\n# Contributing to Dependabot\n\n## Reporting issues and Feature Requests\n\n👋 Want to give us feedback on Dependabot, or contribute to it? That's great - thank you so much!\n\n### Reproducible Example\n\nMost bug reports should be accompanied by a link to a public repository that reproduces the problem. Bug reports that\ncannot be reproduced on a public repo using the [CLI tool](#cli-tool) or [dry-run script](#dry-run-script) may be\nclosed as \"cannot reproduce\".\n\n### No \"+1\" Comments\n\nOur issue tracker is quite active, and as a result there's a good chance someone already filed the same issue. If so,\nplease upvote that issue, because we use 👍 reactions on issues as one signal to gauge the impact of a feature request or bug.\n\nHowever, please do not leave comments that contribute nothing new to the discussion. For details, see [https:\u002F\u002Fgo.dev\u002Fwiki\u002FNoPlusOne](https:\u002F\u002Fgo.dev\u002Fwiki\u002FNoPlusOne). 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.\n\n### Don't file issues about Security Alerts or Dependency Graph\n\nThe issue-tracker is meant solely for issues related to Dependabot's updating logic. Issues about [security alerts](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcode-security\u002Fdependabot\u002Fdependabot-alerts\u002Fabout-dependabot-alerts) or [Dependency Graph](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcode-security\u002Fsupply-chain-security\u002Funderstanding-your-software-supply-chain\u002Fabout-the-dependency-graph) should instead be filed as a [Code Security discussion](https:\u002F\u002Fgithub.com\u002Forgs\u002Fcommunity\u002Fdiscussions\u002Fcategories\u002Fcode-security).\n\nA good rule of thumb is that if you have questions about the _diff_ in a PR, it belongs here.\n\n### Disclosing Security Issues\n\nIf you believe you have found a security vulnerability in Dependabot, please review [our security policy](https:\u002F\u002Fgithub.com\u002Fdependabot\u002Fdependabot-core\u002Fsecurity\u002Fpolicy) for details about disclosing them to the GitHub Bug Bounty program, so we can work to resolve the issue before it is disclosed publicly.\n\n## Submitting Pull Requests\n\nWant to contribute to Dependabot? That's great - thank you so much!\n\nContribution workflow:\n1. Fork the project.\n2. Get the [development environment running](#getting-a-development-environment-running).\n3. Make your feature addition or bug fix.\n4. Add [tests for it](#running-tests). This is important so we don't break it in a future version unintentionally.\n5. Send a pull request. The tests will run on it automatically, so don't worry if you couldn't get them running locally.\n\nPlease refer to the [CONTRIBUTING](CONTRIBUTING.md) guidelines for more information.\n\n## New Ecosystems\n\nIf you're interested in contributing support for a new ecosystem, please refer to the [contributing guidelines](CONTRIBUTING.md#contributing-new-ecosystems) for more information.\n\n# Development Guide\n\n## Getting a Development Environment Running\n\nThe first step to debugging a problem or writing a new feature is getting a development environment going. We provide a\ncustom [Docker-based](https:\u002F\u002Fwww.docker.com\u002Fproducts\u002Fdocker-desktop\u002F) developer shell that bakes in all required dependencies.\nIn most cases this is the best way to work with the project.\n\nThe developer shell uses volume mounts to incorporate your local changes to Dependabot's source code. This way you can\nedit locally using your favorite editor and the changes are immediately reflected within the docker container for performing\n[dry-runs](#debugging-problems) or executing [tests](#running-tests).\nNote: See caveat about [editing the native package manager helper scripts](#making-changes-to-native-package-manager-helpers).\n\n### Quickstart\n\nThe script to launch the developer shell builds the docker images from scratch if it can't find them locally. This can take a while.\n\nSkip the wait by pulling the pre-built image for the ecosystem you want to work on. The image name uses the [YAML ecosystem name](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcode-security\u002Fdependabot\u002Fdependabot-version-updates\u002Fconfiguration-options-for-the-dependabot.yml-file#package-ecosystem)\nto specify the ecosystem.  For example, for Go Modules, the YAML name is `gomod`:\n\n```shell\n$ docker pull ghcr.io\u002Fdependabot\u002Fdependabot-updater-gomod\n```\n\n>**Note:** Pre-built images are currently only available for AMD64 \u002F Intel architecture. They _will_ run on ARM, but 2x-3x slower than if you [manually build ARM-specific images](#building-images-from-scratch).\n\nNext, run the developer shell, specifying the desired ecosystem _using the top-level directory name of the ecosystem in this project_. For example, for Go Modules, the top-level directory is named `go_modules`:\n\n```shell\n$ bin\u002Fdocker-dev-shell go_modules\n=> running docker development shell\n[dependabot-core-dev] ~ $ cd go_modules && rspec spec # to run tests for a particular package\n```\n\n### Building Images from Scratch\n\nNormally the [Quickstart](#quickstart) is all you need, but occasionally you'll need to rebuild the underlying images.\n\nFor example, while we don't yet publish ARM-specific images, if you _are_ working on an ARM-based platform, we recommend\nmanually building the images because the resulting containers run much faster.\n\nThe developer shell runs within a Dependabot Development docker image, which is built on top of an ecosystem image.\n\n```mermaid\nflowchart LR\n    A[\"docker-dev-shell script\"] --> B(\"Dependabot Development docker image\")\n    B --> C(\"Dependabot Updater Ecosystem docker image (ecosystem specific)\")\n    C --> D(\"Dependabot Updater Core docker image\")\n```\n\nChanges to the docker files for any of these images requires building one or more of the images locally in order to be reflected in the development shell.\n\nThe simple but slow way is to delete any existing images and then run `bin\u002Fdocker-dev-shell` which automatically builds\nmissing images.\n\nThe faster way is to pull all the pre-built images that are dependencies of the image you actually need to build.\nTo (re)build a specific one:\n\n- The Updater core image:\n\n  ```shell\n  $ docker pull ghcr.io\u002Fdependabot\u002Fdependabot-updater-core # OR\n  $ docker build -f Dockerfile.updater-core . --tag=dependabot-manual-build\u002Fupdater-core # recommended on ARM\n  ```\n\nEach language\u002Fecosystem sits on top of the core image. You need to rebuild whichever one you’re working on so it picks up your new core bits. For instance, if you’re working on **Go Modules**:\n\n- The Updater ecosystem image:\n\n  ```shell\n  $ docker pull ghcr.io\u002Fdependabot\u002Fdependabot-updater-gomod # OR\n  $ script\u002Fbuild go_modules # recommended on ARM\n  ```\n\n  Or explicitly:\n  ```shell\n  $ docker build \\\n  --platform linux\u002Famd64 \\\n  --file go_modules\u002FDockerfile \\\n  --build-arg UPDATER_CORE_IMAGE=dependabot-manual-build\u002Fupdater-core \\\n  --tag dependabot-manual-build\u002Fupdater-gomod \\\n  .\n  ```\n\n- Spin-up the development container using the `--rebuild` flag:\n\n  ```shell\n  $ bin\u002Fdocker-dev-shell go_modules --rebuild\n  ```\n\n  If successful, you should be inside the shell:\n\n  ```shell\n  => running docker development shell\n  [dependabot-core-dev] ~ $\n  ```\n\n- Once inside the shell, you can run tests, e.g.:\n\n  ```shell\n  rspec common\u002Fspec\u002Fdependabot\u002Ffile_fetchers\u002Fbase_exclude_spec.rb\n  ```\n\n### Making Changes to native Package Manager helpers\n\nSeveral Dependabot packages make use of 'native helpers', small executables in their host language.\n\n**Changes to these files are not automatically reflected inside the development container.**\n\nOnce you have made any edits to the helper files, run the appropriate build script to update the\ninstalled version with your changes like so:\n\n```bash\n$ bin\u002Fdocker-dev-shell bundler\n=> running docker development shell\n$ bundler\u002Fhelpers\u002Fv2\u002Fbuild\n$ bin\u002Fdry-run.rb bundler dependabot\u002Fdemo --dir=\"\u002Fruby\"\n```\n\nTo view logs and stdout from the native package manager helpers, see [debugging native helpers](#debugging-native-package-manager-helpers).\n\n# Debugging Problems\n\nThe first step to debugging is getting the [development environment running](#getting-a-development-environment-running).\n\nWithin the development environment, you have two options for simulating a dependency update job:\nYou can use the newly-developed [CLI tool](#cli-tool) or the original [Dry-run script](#dry-run-script).\n\n## CLI tool\n\nThe [Dependabot CLI](https:\u002F\u002Fgithub.com\u002Fdependabot\u002Fcli) is a newly-developed tool that incorporates the [GitHub\nCredentials Proxy](#private-registry-credential-management) to more realistically simulate what's happening within\nthe Dependabot-at-GitHub service when talking to private registries.\n\nIt has a [dedicated debugging guide](https:\u002F\u002Fgithub.com\u002Fdependabot\u002Fcli#debugging-with-the-cli), including support for dropping into the Ruby debugger.\n\n## Dry-Run Script\n\n>Note: Before running the dry-run script, you'll need to [get the development environment running](#getting-a-development-environment-running).\n\nYou can use the `bin\u002Fdry-run.rb` script to simulate a dependency update job, printing\nthe diff that would be generated to the terminal. It takes two positional\narguments: the [package manager](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcode-security\u002Fdependabot\u002Fdependabot-version-updates\u002Fconfiguration-options-for-the-dependabot.yml-file#package-ecosystem)\nand the GitHub repo name (including the account):\n\n```bash\n$ bin\u002Fdocker-dev-shell go_modules\n=> running docker development shell\n$ bin\u002Fdry-run.rb go_modules rsc\u002Fquote\n=> fetching dependency files\n=> parsing dependency files\n=> updating 2 dependencies\n...\n```\n\n### Helpful options to speed up dry-run testing\n\nThe [Dry-Run script](#dry-run-script) supports many other options, all of which are documented at the [top of the script's source code](bin\u002Fdry-run.rb). For example:\n\n1. `LOCAL_GITHUB_ACCESS_TOKEN=\"fake-GitHub-PAT\"` allows specifying a [GitHub Personal Access Token (PAT)](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fauthentication\u002Fkeeping-your-account-and-data-secure\u002Fcreating-a-personal-access-token) to avoid rate-limiting.\n2. `--dir=\"path\u002Fto\u002Fsubdir\u002Fcontaining\u002Fmanifest` is required if the manifest file is located in a subdirectory.\n3. `--dep=\"dep-name-that-I-want-to-test\"` allows specifying a single dep to try to update and all others are ignored.\n4. `--cache=files` allows caching remote dep files locally for faster re-runs when testing local logic changes.\n5. `--updater-options=feature_flag_name` allows passing in feature flags.\n\nHere's an example of how to string all these together\n\n```bash\n  LOCAL_GITHUB_ACCESS_TOKEN=github_pat_123_fake_string \\\n  bin\u002Fdry-run.rb docker jeffwidman\u002Fsecrets-store-driver \\\n  --dir \"\u002Fmanifest_staging\u002Fcharts\u002Fsecrets-store-provider\" \\\n  --cache=files \\\n  --dep=\"secrets-store\" \\\n  --updater-options=kubernetes_updates\n```\n\n### Adding debug breakpoints\n\nYou can add a `debugger` statement anywhere in the ruby code, for example:\n\n```ruby\n      def latest_resolvable_version\n        debugger\n        latest_version_finder.latest_version\n      end\n```\n\nWhen you execute the job, the Ruby debugger will open. It should look something like this:\n\n```ruby\n[11, 20] in ~\u002Fgo_modules\u002Flib\u002Fdependabot\u002Fgo_modules\u002Fupdate_checker.rb\n    11|   module GoModules\n    12|     class UpdateChecker \u003C Dependabot::UpdateCheckers::Base\n    13|       require_relative \"update_checker\u002Flatest_version_finder\"\n    14|\n    15|       def latest_resolvable_version\n=>  16|         debugger\n    17|         latest_version_finder.latest_version\n    18|       end\n    19|\n    20|       # This is currently used to short-circuit latest_resolvable_version,\n=>#0    Dependabot::GoModules::UpdateChecker#latest_resolvable_version at ~\u002Fgo_modules\u002Flib\u002Fdependabot\u002Fgo_modules\u002Fupdate_checker.rb:16\n  #1    Dependabot::GoModules::UpdateChecker#latest_version at ~\u002Fgo_modules\u002Flib\u002Fdependabot\u002Fgo_modules\u002Fupdate_checker.rb:24\n  # and 9 frames (use `bt' command for all frames)\n(rdbg)\n```\n\nAt this prompt, you can run [debugger commands](https:\u002F\u002Fgithub.com\u002Fruby\u002Fdebug) to navigate around, or enter methods and variables to see what they contain. Try entering `dependency` to see what dependency Dependabot is currently working on.\n\n>**Note** While in the debugger, changes made to the source code will not be picked up. You will have to end your debugging session and restart it.\n\n### Debugging Native Package Manager Helpers\n\nWhen you're debugging an issue you often need to peek inside these scripts that run in a separate process.\n\nPrint all log statements from native helpers using `DEBUG_HELPERS=true`:\n\n```bash\nDEBUG_HELPERS=true bin\u002Fdry-run.rb bundler dependabot\u002Fdemo --dir=\"\u002Fruby\"\n```\n\nPause execution to debug a single native helper function using `DEBUG_FUNCTION=\u003Cfunction name>`. The function maps to a\nnative helper function name, for example, one of the functions in `bundler\u002Fhelpers\u002Fv2\u002Flib\u002Ffunctions.rb`.\n\nWhen this function is being executed a `debugger` is inserted, pausing execution of the `bin\u002Fdry-run.rb` script, this leaves the current updates `tmp` directory in place allowing you to `cd` into the directory and run the native helper function directly:\n\n```bash\n DEBUG_FUNCTION=parsed_gemfile bin\u002Fdry-run.rb bundler dependabot\u002Fdemo --dir=\"\u002Fruby\"\n=> fetching dependency files\n=> dumping fetched dependency files: .\u002Fdry-run\u002Fdependabot\u002Fdemo\u002Fruby\n=> parsing dependency files\n$ cd \u002Fhome\u002Fdependabot\u002Fdependabot-core\u002Ftmp\u002Fdependabot_TEMP\u002Fruby && echo \"{\\\"function\\\":\\\"parsed_gemfile\\\",\\\"args\\\":{\\\"gemfile_name\\\":\\\"Gemfile\\\",\\\"lockfile_name\\\":\\\"Gemfile.lock\\\",\\\"dir\\\":\\\"\u002Fhome\u002Fdependabot\u002Fdependabot-core\u002Ftmp\u002Fdependabot_TEMP\u002Fruby\\\"}}\" | BUNDLER_VERSION=1.17.3 BUNDLE_GEMFILE=\u002Fopt\u002Fbundler\u002Fv1\u002FGemfile GEM_HOME=\u002Fopt\u002Fbundler\u002Fv1\u002F.bundle bundle exec ruby \u002Fopt\u002Fbundler\u002Fv1\u002Frun.rb\n```\n\nCopy and run the `cd...` command:\n\n```bash\ncd \u002Fhome\u002Fdependabot\u002Fdependabot-core\u002Ftmp\u002Fdependabot_TEMP\u002Fruby && echo \"{\\\"function\\\":\\\"parsed_gemfile\\\",\\\"args\\\":{\\\"gemfile_name\\\":\\\"Gemfile\\\",\\\"lockfile_name\\\":\\\"Gemfile.lock\\\",\\\"dir\\\":\\\"\u002Fhome\u002Fdependabot\u002Fdependabot-core\u002Ftmp\u002Fdependabot_TEMP\u002Fruby\\\"}}\" | BUNDLER_VERSION=1.17.3 BUNDLE_GEMFILE=\u002Fopt\u002Fbundler\u002Fv1\u002FGemfile GEM_HOME=\u002Fopt\u002Fbundler\u002Fv1\u002F.bundle bundle exec ruby \u002Fopt\u002Fbundler\u002Fv1\u002Frun.rb\n```\n\nThis should log out the output of the `parsed_gemfile` function:\n\n```ruby\n{\"result\":[{\"name\":\"business\",\"requirement\":\"~> 1.0.0\",\"groups\":[\"default\"],\"source\":null,\"type\":\"runtime\"},{\"name\":\"uk_phone_numbers\",\"requirement\":\"~> 0.1.0\",\"groups\":[\"default\"],\"source\":null,\"type\":\"runtime\"}]}\n```\n\nKeep in mind that unlike changes to the ruby source, changes on your host machine to the native helpers source code are\nnot synced to the development container. So you have two choices for editing the native helper:\n\n- You can directly edit the temporary copy of the native helper within the development container, for example: `vi \u002Fopt\u002Fbundler\u002Fv1\u002Flib\u002Ffunctions\u002Ffile_parser.rb`. And then re-run the `cd...` command. This is the fastest way to debug, but any changes won't be saved outside the container.\n- You can edit your local copy, and then [rebuild the native helper](#making-changes-to-native-package-manager-helpers). This will require re-running the dry-run script to pickup the change.\n\n### Debugging Ignore Conditions\n\nMost of the ecosystems in Dependabot-Core support `ignore` conditions which allow a user to specify dependency names or\nversions to exclude from upgrades. The docs for the Dependabot service at GitHub [describe the feature in more detail](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcode-security\u002Fdependabot\u002Fdependabot-version-updates\u002Fconfiguration-options-for-the-dependabot.yml-file#ignore).\n\nThe [Dependabot CLI](#cli-tool) supports passing in ignore conditions as part of the job definition. See [the example](https:\u002F\u002Fgithub.com\u002Fdependabot\u002Fcli#scenario-file).\n\nThe [dry-run script](#dry-run-script) supports passing in one or more ignore conditions via the env var `IGNORE_CONDITIONS`:\n\n```bash\nIGNORE_CONDITIONS='[{\"dependency-name\":\"*\",\"update-types\": [\"version-update:semver-major\"]}]' \\\nbin\u002Fdry-run.rb docker test_org\u002Ftest-dependabot`\n```\n\n### Debugging Security Updates\n\nMany of the ecosystems in Dependabot-Core support [security updates](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcode-security\u002Fdependabot\u002Fdependabot-security-updates\u002Fabout-dependabot-security-updates). These are a special form of version update where a\ndependency name and range of vulnerable versions are passed in. Dependabot-Core will try to upgrade any instance of that\ndependency to the _minimum_ non-vulnerable version. This is in contrast to a normal version update which tries to update\nto the _latest_ version.\n\nThe env var `SECURITY_ADVISORIES` allows passing one or more security alert notifications to the [dry-run script](#dry-run-script) in order to simulate a security update:\n\n```bash\nSECURITY_ADVISORIES='[{\"dependency-name\":\"buffer\",\"patched-versions\":[],\"unaffected-versions\":[],\"affected-versions\":[\"\u003C= 2.0.0\"]}]' \\\nbin\u002Fdry-run.rb pub dart-lang\u002Fpub-dev --dir \"\u002Fapp\" --cache=files --dep=\"buffer\"\n```\n\n### Visual Studio Code and Docker\n\nThere's built-in support for leveraging Visual Studio Code's [ability for\ndebugging](https:\u002F\u002Fcode.visualstudio.com\u002Fdocs\u002Fdevcontainers\u002Fcontainers) inside a Docker container.\nAfter installing the recommended [`Dev Containers` extension](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=ms-vscode-remote.remote-containers),\nsimply press `Ctrl+Shift+P` (`⇧⌘P` on macOS) and select `Dev Containers: Reopen in Container`.\nYou can also access the dropdown by clicking on the green button in the bottom-left corner of the editor.\nIf the development Docker image isn't present on your machine, it will be built automatically.\nOnce that's finished, start the `Debug Dry Run` configuration `(F5)` and you'll be prompted\nto select a package manager and a repository to perform a dry run on.\nFeel free to place breakpoints on the code.\n\nThere is also support to debug individual test runs by running the `Debug Tests` configuration `(F5)`\nand you'll be prompted to select an ecosystem and provide an rspec path.\n\n⚠️ The `Clone Repository ...` commands of the Remote Containers extension are currently\nmissing some functionality and are therefore not supported. You have to clone the\nrepository manually and use the `Reopen in Container` or `Open Folder in Container...`\ncommand.\n\n## Running Tests\n\nOnce you get the [development environment for a particular ecosystem](#getting-a-development-environment-running) going,\nexecute the tests for that ecosystem by running `rspec spec` inside that ecosystem's folder, e.g.\n\n```bash\n$ cd go_modules\n$ rspec spec\n```\n\nYou can also limit the tests to only the file you're working on, or only tests that previously failed, for example:\n\n```bash\n$ rspec spec\u002Fdependabot\u002Ffile_updaters\u002Felixir --only-failures\n```\n\nStyle is enforced by [RuboCop](https:\u002F\u002Frubocop.org\u002F). To check for style violations, simply run `rubocop` in\neach of the packages, e.g.\n\n```bash\n$ cd go_modules\n$ rubocop\n```\n\n## Profiling\n\nYou can profile a [dry-run](#dry-run-script) by passing the `--profile` flag when running it, or tag an `rspec` test with `:profile`.\nThis will generate a `stackprof-\u003Cdatetime>.dump` file in the `tmp\u002F` folder, and you can generate a flamegraph from this\nby running:\n\n```bash\nstackprof --d3-flamegraph tmp\u002Fstackprof-\u003Cdata or spec name>.dump > tmp\u002Fflamegraph.html\n```\n\n# Architecture and Code Layout\n\nDependabot-Core is a collection of Ruby packages (gems), which contain the logic for updating dependencies in several languages.\n\n### `dependabot-common`\n\nThe `common` package contains all general-purpose\u002Fshared functionality. For instance, the code for creating pull\nrequests for the different supported platforms lives here, as does most of the logic for handling Git dependencies (as\nmost languages support Git dependencies in one way or another). There are also base classes defined for each of the\nmajor concerns required to implement support for a language or package manager.\n\n### `dependabot-{package-manager}`\n\nThere is a gem for each package manager or language that Dependabot\nsupports. At a minimum, each of these gems will implement the following\nclasses:\n\n| Service          | Description                                                                                   |\n|------------------|-----------------------------------------------------------------------------------------------|\n| `FileFetcher`    | Fetches the relevant dependency files for a project (e.g., the `Gemfile` and `Gemfile.lock`). See the [README](common\u002Flib\u002Fdependabot\u002Ffile_fetchers\u002FREADME.md) for more details. |\n| `FileParser`     | Parses a dependency file and extracts a list of dependencies for a project. See the [README](common\u002Flib\u002Fdependabot\u002Ffile_parsers\u002FREADME.md) for more details. |\n| `UpdateChecker`  | Checks whether a given dependency is up-to-date. See the [README](common\u002Flib\u002Fdependabot\u002Fupdate_checkers\u002FREADME.md) for more details. |\n| `FileUpdater`    | Updates a dependency file to use the latest version of a given dependency. See the [README](common\u002Flib\u002Fdependabot\u002Ffile_updaters\u002FREADME.md) for more details. |\n| `MetadataFinder` | Looks up metadata about a dependency, such as its GitHub URL. See the [README](common\u002Flib\u002Fdependabot\u002Fmetadata_finders\u002FREADME.md) for more details. |\n| `Version`        | Describes the logic for comparing dependency versions. See the [hex Version class](hex\u002Flib\u002Fdependabot\u002Fhex\u002Fversion.rb) for an example. |\n| `Requirement`    | Describes the format of a dependency requirement (e.g. `>= 1.2.3`). See the [hex Requirement class](hex\u002Flib\u002Fdependabot\u002Fhex\u002Frequirement.rb) for an example. |\n\nThe high-level flow looks like this:\n\n![Dependabot high-level architecture diagram](architecture.svg)\n\n### `dependabot-omnibus`\n\nThis is a \"meta\" gem, that simply depends on all the others. If you want to\nautomatically include support for all languages, you can just include this gem\nand you'll get all you need.\n\n## Private Registry Credential Management\n\nFor many ecosystems, Dependabot-Core supports private registries. Sometimes this happens by passing the private registry\ncredentials directly to the native package managers (`npm`, `pip`, `bundler`, etc), other times it happens within the\nDependabot-Core Ruby code.\n\n```mermaid\nsequenceDiagram\n    Private Registry Credentials->>Dependabot-Core:\u003Cbr \u002F>\n    Dependabot-Core->>Native Package Managers:\u003Cbr \u002F>\n    Native Package Managers->>Package Registries:\u003Cbr \u002F>\n    Dependabot-Core->>Package Registries:\u003Cbr \u002F>\n```\n\nWhile simple and straightforward, this is a security risk for ecosystems that allow running untrusted code within their\nmanifest files. For example `setup.py` and `.gemspec` allow running native Python and Ruby code. If a package in the\ndependency tree gets hacked, an attacker could push a malicious manifest that forces the native package manager to\nexpose the creds.\n\nTo guard against this, for the Dependabot service that Github runs, we wrap Dependabot-Core with a credential proxy so\nthose private registry secrets are never exposed to Dependabot-Core.\n\n```mermaid\nsequenceDiagram\n    Dependabot-Core->>Credentials Proxy: All requests are unauthenticated\n    Credentials Proxy->>Package Registries: Creds are injected by the Proxy\n    Note left of Dependabot-Core: The Dependabot Service\u003Cbr \u002F> that GitHub Runs\n    Package Registries->>Credentials Proxy: Creds are stripped by the Proxy\n    Credentials Proxy->>Dependabot-Core: Dependabot-Core never sees private registry credentials\n```\n\nThis also means if Dependabot-Core ever has a security vulnerability, those creds are still not at risk of being exposed.\n\n\n# Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of GitHub trademarks or logos is\nsubject to and must follow [GitHub Logos and Usage](https:\u002F\u002Fgithub.com\u002Flogos). Use of GitHub trademarks or logos in modified versions of this project must not\ncause confusion or imply GitHub sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.\n\n# History\n\nDependabot and dependabot-core started life as [Bump](https:\u002F\u002Fgithub.com\u002Fgocardless\u002Fbump) and\n[Bump Core](https:\u002F\u002Fgithub.com\u002Fgocardless\u002Fbump-core), back when @hmarr and @greysteil were working at\n[GoCardless](https:\u002F\u002Fgocardless.com).\n\nDependabot became a part of GitHub in 2019!\n\n# Notes for project maintainers\n\n\u003Cdetails>\u003Csummary>:book: Release guide\u003C\u002Fsummary>\n\u003Cp>\n\nPublish a new release to RubyGems by running the [`Gems - Bump Version`](https:\u002F\u002Fgithub.com\u002Fdependabot\u002Fdependabot-core\u002Factions\u002Fworkflows\u002Fgems-bump-version.yml) workflow and following the instructions on the job summary.\n\nIn a nutshell the process will be:\n\n1. Run the action to generate a version bump PR.\n2. Merge the PR.\n3. Tag that merge commit as a new release using the format `v1.2.3`. The job summary contains a URL pre-populated with the correct version for the title and tag.\n4. Once the release is tagged, another GitHub Action workflow automatically pushes it to RubyGems.\n\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n","Dependabot-Core 是一个用于自动生成依赖项更新拉取请求的核心库。它支持多种编程语言和工具，包括 Ruby、JavaScript、Python、PHP 等，并能处理 Docker 文件、Terraform 文件等。其主要功能是检查项目的最新可解析依赖版本，生成更新后的清单和锁定文件，并创建包含变更日志、发布说明和提交记录的拉取请求。该项目适合需要自动化管理项目依赖版本更新的开发者或团队使用，尤其适用于维护多个开源项目或企业内部代码库的场景。",2,"2026-06-11 03:13:57","top_language"]