How-To2026-09-089 min read

How to Set Up Dependabot in GitHub

Outdated dependencies are one of the most common sources of security vulnerabilities in software projects. Every dependency in your project is a surface area for known CVEs, and the longer you go without updating, the harder and riskier each update becomes. Dependabot automates the tedious work of checking for updates and creating pull requests so your team stays current without manual effort.

GitHub's Dependabot is free for all repositories and supports every major package ecosystem — npm, pip, Maven, Go modules, Docker, and more. This guide walks you through configuring Dependabot for your project with sensible defaults, grouping strategies, and review workflows that balance security with stability.

Step-by-step guide

01

Enable Dependabot Security Alerts

Before configuring automated updates, enable Dependabot security alerts in your repository settings under Security > Code security and analysis. These alerts notify you when a dependency in your lockfile has a known vulnerability. Security alerts are the foundation — even if you don't want automated PRs, you should always know when your dependencies have disclosed vulnerabilities.

  • Enable 'Dependency graph' to allow GitHub to analyze your dependency tree
  • Enable 'Dependabot alerts' to receive notifications for known vulnerabilities
  • Enable 'Dependabot security updates' to get automatic PRs specifically for security fixes
02

Create the Dependabot Configuration File

Create a file at .github/dependabot.yml in your repository. This YAML file tells Dependabot which package ecosystems to monitor, how often to check for updates, and how to handle the update PRs. Start with a basic configuration that covers your primary package managers. Each entry in the 'updates' array defines monitoring for one ecosystem in one directory.

  • Add an entry for each package ecosystem your project uses (npm, pip, docker, github-actions, etc.)
  • Set 'directory' to '/' for root-level package files or the specific path for monorepo sub-packages
  • Specify 'schedule.interval' as 'weekly' for most ecosystems — daily creates too much noise, monthly is too slow for security
03

Configure Update Grouping

By default, Dependabot opens a separate PR for every outdated dependency, which can flood your PR queue. Use the 'groups' configuration to batch related updates into single PRs. Group minor and patch updates together by dependency type — for example, group all development dependencies into one PR and all production dependencies into another. Keep major version updates as individual PRs since they often require code changes.

  • Create a 'minor-and-patch' group for updates that are unlikely to break anything
  • Keep major version bumps ungrouped so they get individual review attention
  • Use 'dependency-type: development' and 'dependency-type: production' to separate dev and prod dependency groups
04

Set Version Update Strategies

Configure how aggressively Dependabot updates dependencies using the 'versioning-strategy' option. For applications (not libraries), use 'lockfile-only' to update the lockfile without changing the version constraint in package.json — this minimizes disruption. For security updates specifically, use 'increase' to allow constraint changes when the fix requires a newer version range. Set 'open-pull-requests-limit' to a reasonable number (5-10) to prevent PR queue overflow.

  • Use 'allow' and 'ignore' rules to fine-tune which dependencies Dependabot touches — ignore dependencies you've pinned for a specific reason
  • Set 'open-pull-requests-limit: 10' to cap the maximum number of open Dependabot PRs at any time
05

Configure Labels, Reviewers, and Assignees

Make Dependabot PRs easy to manage by configuring automatic labels, reviewers, and assignees. Add labels like 'dependencies' and 'automated' so you can filter Dependabot PRs in your PR list. Assign reviewers from the team that owns the relevant code. These configurations ensure Dependabot PRs don't languish unreviewed — which is the most common failure mode of Dependabot adoption.

  • Set 'labels: ["dependencies"]' on each update entry for consistent PR filtering
  • Set 'reviewers' to the team or individuals responsible for dependency updates
  • Create a GitHub Actions workflow that auto-merges Dependabot PRs for patch updates if all CI checks pass
06

Set Up Auto-Merge for Low-Risk Updates

Create a GitHub Actions workflow that automatically approves and merges Dependabot PRs that meet safety criteria: the update is a patch version bump, all CI tests pass, and no security advisories are associated with the current version. This automation handles the routine updates that make up 80% of Dependabot PRs, freeing your team to focus review time on major updates and security fixes that require human judgment.

  • Use the 'dependabot/fetch-metadata' action to detect the update type (major, minor, patch) and only auto-merge patches
  • Require all CI checks to pass before auto-merge — never merge a dependency update that breaks tests
  • Exclude auto-merge for production-critical dependencies that warrant manual review regardless of version bump type

Common mistakes

Enabling Dependabot Without CI Tests

Auto-merging dependency updates without a comprehensive test suite is a recipe for subtle breakages. Before enabling Dependabot, ensure your CI pipeline has adequate test coverage — especially integration tests that exercise dependency interactions. Dependabot PRs that pass CI should be safe to merge; if your CI doesn't catch regressions, the problem is your test suite, not Dependabot.

Ignoring Dependabot PRs Until They Pile Up

A queue of 30 unreviewed Dependabot PRs is worse than no automation — the PRs conflict with each other, become stale, and create a mountain of work. Set up auto-merge for low-risk updates and schedule a weekly 15-minute slot to review the remaining PRs. If you can't keep up, reduce the update frequency or increase grouping.

Not Configuring Grouping From Day One

Without grouping, a monorepo with 200 dependencies gets 200 individual PRs. Configure grouping in your initial dependabot.yml — even a simple group that batches all minor and patch updates together reduces PR volume by 80-90%.

Tips

Use '@dependabot rebase' as a PR comment to automatically rebase a Dependabot PR that has merge conflicts — no manual intervention needed.

Set up a dedicated Slack channel for Dependabot PR notifications so they don't clutter your main development channels.

Review the GitHub Security tab's 'Dependabot alerts' weekly to ensure no critical vulnerabilities are being ignored — alerts without PRs may require manual intervention.

For monorepos, configure separate Dependabot entries for each sub-package with different schedules based on how critical each package is.

How Vantage helps

Vantage helps product teams capture operational requirements like dependency management policies in their PRDs. When defining a new service or feature, Vantage ensures that engineering setup requirements — including CI configuration, dependency update automation, and security scanning — are documented as part of the project scope.

Frequently asked questions

Spend less time on setup, more on decisions

Vantage connects your tools and generates specs grounded in real data. Free to start.

Free to start. No credit card required.

Related reading