👋 We've unified all of GitHub's product documentation in one place! Check out the content for REST API, GraphQL API, and Developers. Learn more on the GitHub blog.
Article version: GitHub.com

Listing the packages that a repository depends on

You can see your project's dependencies, as well as any detected vulnerabilities, in the dependency graph.

In this article

Were you able to find what you were looking for?

About the dependency graph

The dependency graph is available for every public repository that define dependencies in a supported package ecosystem using a supported file format. Repository administrators can also set up the dependency graph for private repositories.

You can view and update vulnerable dependencies in your repository's dependency graph. The dependency graph lists vulnerable dependencies before other dependencies. For more information, see "About alerts for vulnerable dependencies."

You can view dependencies used in organization repositories in a single dashboard. For more information, see "Viewing insights for your organization."

Supported package ecosystems

Package managerLanguagesRecommended formatsSupported formats
MavenJava, Scalapom.xmlpom.xml
npmJavaScriptpackage-lock.jsonpackage-lock.json, package.json
YarnJavaScriptyarn.lockpackage.json, yarn.lock
dotnet CLI.NET languages (C#, C++, F#, VB).csproj, .vbproj, .nuspec, .vcxproj, .fsproj.csproj, .vbproj, .nuspec, .vcxproj, .fsproj, packages.config
Python PIPPythonrequirements.txt, pipfile.lockrequirements.txt, pipfile.lock, setup.py*
RubyGemsRubyGemfile.lockGemfile.lock,Gemfile, *.gemspec
ComposerPHPcomposer.lockcomposer.json, composer.lock

Note: If you list your Python dependencies within a setup.py file, we may not be able to parse, list, and alert on every dependency in your project.

Listing dependencies for a repository with the dependency graph enabled

  1. On GitHub, navigate to the main page of the repository.
  2. Under your repository name, click Insights.
    Insights tab in the main repository navigation bar
  3. In the left sidebar, click Dependency graph.
    Dependency graph tab in the left sidebar

Enabling the dependency graph for a private repository

  1. On GitHub, navigate to the main page of the repository.
  2. Under your repository name, click Insights.
    Insights tab in the main repository navigation bar
  3. In the left sidebar, click Dependency graph.
    Dependency graph tab in the left sidebar
  4. Read the message about the granting GitHub access to repository data to enable the dependency graph, then click Allow access.
    Button to allow access to repository data to enable the dependency graph

For more information, see "Understanding how GitHub uses and protects your data."

Disabling the dependency graph for a private repository

  1. On GitHub, navigate to the main page of the repository.
  2. Under your repository name, click Settings.
    Repository settings button
  3. In the left sidebar, click Security & analysis.
    "Security & analysis" tab in repository settings
  4. Next to "Dependency Graph", click Disable.
    "Disable" button for the dependency graph

Troubleshooting the dependency graph

If your project has dependencies, but no dependencies are detected in your graph, there may be a problem with the file containing your dependencies. Check your project's file to ensure that it's correctly formatted for the file type.

Further reading

Were you able to find what you were looking for?

Ask a human

Can't find what you're looking for?

Contact us