Viewing and updating vulnerable dependencies in your repository

If GitHub discovers vulnerable dependencies in your project, you can view them on the Dependabot alerts tab of your repository. Then, you can update your project to resolve or dismiss the vulnerability.

Repository administrators and organization owners can view and update dependencies.

In this article

Did this doc help you?

Your repository's GitHub Dependabot alerts tab lists all open and closed GitHub Dependabot alerts and corresponding GitHub Dependabot security updates. You can sort the list of alerts using the drop-down menu, and you can click into specific alerts for more details. For more information, see "About alerts for vulnerable dependencies."

You can enable automatic security updates for any repository that uses GitHub Dependabot alerts and the dependency graph. For more information, see "Configuring GitHub Dependabot security updates."

About updates for vulnerable dependencies in your repository

GitHub sends GitHub Dependabot alerts when we detect vulnerabilities affecting your repository. For repositories where GitHub Dependabot security updates are enabled, when GitHub detects a vulnerable dependency Dependabot creates a pull request to fix it. The pull request will upgrade the dependency to the minimum possible secure version needed to avoid the vulnerability.

Note: It's good practice to have automated tests and acceptance processes in place so that checks are carried out before the pull request is merged. This is particularly important if the suggested version to upgrade to contains additional functionality, or a change that breaks your project's code. For more information about continuous integration, see "About continuous integration."

Viewing and updating vulnerable dependencies

  1. On GitHub, navigate to the main page of the repository.
  2. Under your repository name, click Security.
    Security tab
  3. In the security sidebar, click Dependabot alerts.
    Dependabot alerts tab
  4. Click the alert you'd like to view.
    Alert selected in list of alerts
  5. Review the details of the vulnerability and, if available, the pull request containing the automated security update.
  6. Optionally, if there isn't already a GitHub Dependabot security updates update for the alert, to create a pull request to resolve the vulnerability, click Create Dependabot security update.
    Create Dependabot security update button
  7. When you're ready to update your dependency and resolve the vulnerability, merge the pull request. Each pull request raised by Dependabot includes information on commands you can use to control Dependabot. For more information, see "Managing pull requests for dependency updates."
  8. Optionally, if the alert is being fixed, if it's incorrect, or located in unused code, use the "Dismiss" drop-down, and click a reason for dismissing the alert.
    Choosing reason for dismissing the alert via the "Dismiss" drop-down

Further reading

Did this doc help you?