{"meta":{"title":"Automatic dependency submission","intro":"Network access requirements, troubleshooting, and ecosystem-specific behavior for automatic dependency submission.","product":"Security and code quality","breadcrumbs":[{"href":"/en/code-security","title":"Security and code quality"},{"href":"/en/code-security/reference","title":"Reference"},{"href":"/en/code-security/reference/supply-chain-security","title":"Supply chain security"},{"href":"/en/code-security/reference/supply-chain-security/automatic-dependency-submission","title":"Automatic dependency submission"}],"documentType":"article"},"body":"# Automatic dependency submission\n\nNetwork access requirements, troubleshooting, and ecosystem-specific behavior for automatic dependency submission.\n\n## Configure network access for self-hosted runners\n\nIf your self-hosted runners operate behind a firewall with restricted outbound internet access, you must add certain URLs to the allowlist for automatic dependency submission. The required URLs depend on the ecosystems your repositories use.\n\n### Required URLs for all ecosystems\n\nThese URLs are required for all automatic dependency submission workflows:\n\n* `https://github.com`—Required for accessing GitHub and downloading actions.\n* `https://api.github.com`—Required for GitHub API access.\n* `https://*.githubusercontent.com`—Required for downloading action source code and releases (including `raw.githubusercontent.com`, `github-releases.githubusercontent.com`, and `objects.githubusercontent.com`).\n\n### Ecosystem-specific URLs\n\nDepending on the ecosystems you use, you may need to allowlist additional URLs.\n\n#### Go\n\n* `https://go.dev`—For downloading the Go toolchain.\n* `https://golang.org`—Alternate domain for Go downloads.\n* `https://proxy.golang.org`—Official Go module proxy for downloading Go modules during dependency detection.\n\n> \\[!NOTE]\n> The `actions/go-versions` repository is accessed via `https://raw.githubusercontent.com`, which is already covered in the general requirements.\n\n#### Java (Maven and Gradle)\n\n* `https://repo.maven.apache.org`—Maven Central repository for downloading dependencies.\n* `https://api.adoptium.net`—For downloading Adoptium/Temurin JDK distributions (default distribution used by `actions/setup-java`).\n\nIf you use a different JDK distribution, you may also need:\n\n* `https://aka.ms` and `https://download.microsoft.com`—For Microsoft Build of OpenJDK (note: `aka.ms` is also used for .NET downloads).\n* `https://download.oracle.com`—For Oracle JDK.\n* `https://api.azul.com`—For Azul Zulu OpenJDK.\n\n#### .NET (C#, F#, Visual Basic)\n\n* `https://aka.ms`—Microsoft URL shortener that redirects to .NET download locations.\n* `https://builds.dotnet.microsoft.com`—Primary feed for .NET SDK and runtime downloads.\n* `https://ci.dot.net`—Secondary feed for .NET builds.\n\n> \\[!NOTE]\n> The `microsoft/component-detection` tool used by .NET autosubmission is downloaded from GitHub releases, which is already covered in the general requirements (`https://github.com` and `https://*.githubusercontent.com`).\n\n#### Python\n\n* `https://python.org`—For downloading Python interpreters.\n\n> \\[!NOTE]\n> The `actions/python-versions` repository and `microsoft/component-detection` releases are accessed via URLs already covered in the general requirements (`https://*.githubusercontent.com` and `https://github.com`).\n\n## Use GitHub-hosted larger runners for automatic dependency submission\n\nGitHub Team or GitHub Enterprise Cloud users can use larger runners to run automatic dependency submissions jobs.\n\n1. Provision a larger runner at the organization level with the name `dependency-submission`. For more information, see [Adding a larger runner to an organization](/en/actions/using-github-hosted-runners/about-larger-runners/managing-larger-runners#adding-a-larger-runner-to-an-organization).\n2. Give your repository access to the runner. For more information, see [Allowing repositories to access larger runners](/en/actions/using-github-hosted-runners/about-larger-runners/managing-larger-runners#allowing-repositories-to-access-larger-runners).\n3. Under \"Dependency graph\", click the dropdown menu next to “Automatic dependency submission”, then select **Enabled for labeled runners**.\n\n## Troubleshoot automatic dependency submission\n\nAutomatic dependency submission makes a best effort to cache package downloads between runs using the [Cache](https://github.com/marketplace/actions/cache) action to speed up workflows. For self-hosted runners, you may want to manage this cache within your own infrastructure. To do this, you can disable the built-in caching by setting an environment variable of `GH_DEPENDENCY_SUBMISSION_SKIP_CACHE` to `true`. For more information, see [Store information in variables](/en/actions/learn-github-actions/variables).\n\n### Manifest deduplication\n\nA repository can use multiple methods for dependency submission, which can cause the same package manifest to be scanned multiple times, potentially with different outputs from each scan. Dependency graph uses deduplication logic to parse the outputs, prioritizing the most accurate information for each manifest file.\n\nDependency graph displays only one instance of each manifest file using the following precedence rules.\n\n1. **User submissions** take the highest priority, because they are usually created during artifact builds they have the most complete information.\n   * If there are multiple manual snapshots from different detectors, they are sorted alphabetically by correlator and the first one used.\n   * If there are two correlators with the same detector, the resolved dependencies are merged. For more information about correlators and detectors, see [REST API endpoints for dependency submission](/en/rest/dependency-graph/dependency-submission).\n2. **Dependabot graph jobs** have the second-highest priority. For ecosystems where Dependabot graph jobs are available (currently Go and Python), they take precedence over automatic dependency submission.\n3. **Automatic submissions** have the next priority since they are also created during artifact builds, but are not submitted by users.\n4. **Static analysis results** are used when no other data is available.\n\n## Package ecosystem-specific information\n\n### Maven projects\n\nFor Maven projects, automatic dependency submission runs an open source fork of the [Maven Dependency Tree Dependency Submission](https://github.com/marketplace/actions/maven-dependency-tree-dependency-submission). The fork allows GitHub to stay in sync with the upstream repository plus maintain some changes that are only applicable to automatic submission. The fork's source is available at [advanced-security/maven-dependency-submission-action](https://github.com/advanced-security/maven-dependency-submission-action).\n\nIf your repository's dependencies seem inaccurate, check that the timestamp of the last dependency graph build matches the last change to your `pom.xml` file. The timestamp is visible on the table of alerts in the repository's Dependabot tab. Pushing a commit which updates `pom.xml` will trigger a new run of the Dependency Tree Submission action and force a rebuild of that repository's dependency graph.\n\n### Gradle projects\n\nFor Gradle projects, automatic dependency submission runs a fork of the open source Gradle actions from [gradle/actions](https://github.com/gradle/actions). The fork is available at [actions/gradle-build-tools-actions](https://github.com/actions/gradle-build-tools-actions). You can view the results of the autosubmission action under your repository's **Actions** tab. Each run will be labeled \"Automatic Dependency Submission (Gradle)\" and its output will contain the JSON payload which the action submitted to the API.\n\n### .NET projects\n\nThe .NET autosubmission action uses the open source [component-detection](https://github.com/microsoft/component-detection/) project as the engine for its dependency detection. It supports .NET 8.x, 9.x, and 10.x. .NET autosubmission runs if the repository's `dependabot.yml` defines `nuget` as a [`package-ecosystem`](/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#package-ecosystem-) or when there is a supported manifest file in the root directory of the repository. Supported manifest files include `.sln`, `.csproj`, `packages.config`, `.vbproj`, `.vcxproj`, and `.fsproj`.\n\n### Python projects\n\nPython repositories with the dependency graph enabled use Dependabot graph jobs to generate dependency graphs. Dependabot graph jobs take precedence over automatic dependency submissions, and the autosubmission workflow described below will no longer run for Python projects. For more information, see [How the dependency graph recognizes dependencies](/en/code-security/concepts/supply-chain-security/dependency-graph-data#dependabot-graph-jobs).\n\nAutomatic dependency submission for Python uses the open source [component-detection](https://github.com/microsoft/component-detection/) project as its underlying graph generation engine. The autosubmission action will only run if there is a `requirements.txt` file in the root directory of the repository. Python autosubmission does not currently support private packages; packages referenced in `requirements.txt` which are not publicly available will cause the autosubmission action to fail.\n\n> \\[!NOTE]\n> This action uses [actions/setup-python](https://github.com/actions/setup-python) to install Python. You must include a .python-version file in your repository to specify the Python version to be installed."}