Skip to main content
This guide shows how to use GitHub Dependabot’s security update feature to automatically open pull requests that patch detected vulnerabilities. Dependabot will create PRs for vulnerabilities where a safe upgrade or patch exists, helping you keep dependencies secure with minimal manual effort.

Enable Dependabot security updates

At the repository level go to Settings → Security & analysis → Advanced Security and enable Dependabot security updates (sometimes labeled “Security updates”). You can also enable Grouped security updates to reduce PR noise by bundling related fixes from the same package ecosystem into fewer pull requests.
A screenshot of a GitHub repository's Security & analysis settings page showing Dependabot options (Dependabot alerts, rules, malware alerts, security updates) with enable/disable buttons. The page is displayed in a dark theme.
Enable Dependabot security updates at the repository level to get automated PRs for fixable vulnerabilities. Turn on grouped updates to bundle multiple related dependency bumps into a single PR and reduce churn.
After enabling the feature, Dependabot will analyze the repository (this may take a few minutes) and open pull requests for affected dependencies when upgrades are available. If you enabled grouped updates, Dependabot will try to combine related fixes within the same package ecosystem into a single PR.

What to expect: Dependabot PRs

When Dependabot opens a PR it typically:
  • Bumps the package version in dependency files such as package.json, package-lock.json, or yarn.lock.
  • Includes a changelog or security note in the PR body when available.
  • Is authored by the Dependabot bot and will reference the related Dependabot alert(s).
In this example Dependabot created PRs to update vulnerable packages (Mongoose and Lodash).
A screenshot of a GitHub pull request page showing a Dependabot update titled "Bump mongoose from 5.13.20 to 6.13.10" for the npm_and_yarn group. The PR details, reviewer/labels sidebar and a bot comment are visible, with a red "Unable to merge" indicator.

Review the Dependabot PR

Open the PR and review the changed files (for example package.json, package-lock.json, or yarn.lock). Key review steps: Always run your test suite and build steps on Dependabot PRs to ensure the upgrade doesn’t break your project.

Branch protection and required checks

Branch protection rules or required status checks (for example, CodeQL code scanning or other CI jobs) may block merging until checks pass. Repository admins with the appropriate permissions might see a “Bypass rules and merge” option, but bypassing protections is risky.
Bypassing branch protection or required checks should be done only when absolutely necessary and by someone who understands the potential risk. Prefer letting CI and security scans complete before merging Dependabot updates.
A GitHub pull request page for a Dependabot update that bumps the mongoose package, showing a prominent "Merging is blocked" warning because CodeQL code scanning is waiting for results. The UI also shows a "Bypass rules and merge" option, labels/commit info, and a comment box.
If the checks pass and you merge the PR, Dependabot will automatically close the corresponding Dependabot alerts for the updated packages. You can verify resolved alerts on the repository Security and analysis → Dependabot alerts page; merged updates will reduce the count of open alerts and show which alerts were resolved by the merged PRs.

Quick PR review checklist

Use this checklist when evaluating a Dependabot PR:

Best practices

By enabling Dependabot security updates and following these review and CI practices, you can reduce the time between vulnerability discovery and remediation, while keeping merge confidence high.

Watch Video