GitHub License Checks Can Block a Dependency PR. Here’s What They Actually Prove
GitHub’s license checks are generally available for Enterprise Cloud. See what the gate detects, who qualifies and where human review is needed.
On this page
A new dependency can be functionally perfect and still create a release problem: its license may be incompatible with how a company distributes its product. GitHub’s license-compliance feature turns that concern into a check that can run when a pull request changes package manifests. Its October 16 general-availability announcement matters because policy can now become a merge condition for eligible enterprise repositories. The useful question is not whether a bot can “approve” a license. It is whether a team has a clear policy, reliable dependency data and a review path for exceptions.
What became generally available
The feature lets an enterprise define which dependency licenses are acceptable, then target repositories with rulesets. When a pull request adds or changes dependencies, GitHub compares the dependency data against that policy and reports noncompliant packages. An active ruleset can require a passing license-compliance result before merge. GitHub also supports an Evaluate mode that records findings without blocking, useful for discovering how a rule behaves before making it a gate. [1] [2]
The October release expands availability to GitHub Enterprise Cloud, including data-resident instances, where GitHub Code Security is enabled. GitHub’s documentation also lists dependency-graph enablement as a prerequisite for the repositories being evaluated. The feature relies on the dependency graph’s package and license information, including transitive dependencies when that data is detected. It is not a general license scanner for every file, binary, copied code fragment or artifact that may enter a repository. [2] [3]
This is a different control from a developer reading a license file after merge. It makes the organization’s chosen rule visible in the pull-request path. GitHub says the GA release adds audit log events for policy changes and APIs to download, update and replace policies, plus an API to check package compliance. Those additions make policy maintenance and integration with other systems more practical; they do not remove the need to set the policy carefully. [1]

A passing check is only as useful as the policy behind it
A company might allow permissively licensed packages by default, require review for reciprocal licenses, and prohibit a small set of licenses for a specific product. Those decisions depend on the company’s distribution model, obligations, contractual commitments and risk tolerance. GitHub provides the mechanism for expressing and applying a policy; it does not choose one universal policy for every organization.
The data itself has limits. A dependency graph can only assess packages it can identify and license metadata it can resolve. A missing or ambiguous license should trigger a defined human process, not be treated automatically as either permission or prohibition. Likewise, an allowed license does not prove that the package is maintained, secure, authentic, or safe to execute. For broader supply-chain controls, see our guide to npm’s v12 security changes and GitHub Actions lockfiles; dependency identity and license policy answer different questions.
Roll it out without turning the gate into noise
Start by naming the owners who can define the policy and approve exceptions. Then enable the dependency graph for the repositories in scope, create a ruleset in Evaluate mode, and inspect the findings across a representative group of applications. Record which results are missing metadata, which are true policy violations, and which require an approved exception. Only after that review should a team activate merge blocking for selected repositories.
Keep the exception path narrow and auditable. A request should identify the package, version, intended use, distribution path and the reason the team needs it. GitHub’s enterprise license-manager role can handle policy exceptions, while audit events help track policy changes. Review policy changes like code: include a rationale, owner and effective date, and check whether a policy update affects existing repositories as well as new pull requests. [1] [2]
What this feature does not settle
License rules can prevent a known disallowed dependency from quietly entering a protected branch. They cannot determine whether a license interpretation is correct for a particular product, catch every copied code fragment, or replace legal review. GitHub’s own documentation frames the result as dependency-policy enforcement. That is a useful control when an organization has already done the harder work of deciding what it wants the policy to mean.
For maintainers, a good first outcome may be a report rather than a blocked pull request: a concrete inventory of dependency licenses and an exception process that people can use. The point of a merge gate is to make an agreed rule dependable. It cannot make an unclear rule clear by itself.
Frequently asked questions
Who can use GitHub open-source license compliance?
The feature is generally available for GitHub Enterprise Cloud, including data-resident deployments, when GitHub Code Security is enabled for the repositories that need enforcement. The dependency graph must also be enabled for repositories being evaluated.
Does GitHub’s license check decide whether a dependency is legally safe?
No. It evaluates license information detected in dependency data against an organization’s configured policy. Teams still need to decide what their policy means for distribution, linking, notices, patents, and their specific product.
Can a license policy block a pull request?
Yes, if an active branch ruleset requires license-compliance results before merging. An Evaluate-mode ruleset reports findings without blocking, which can help teams measure policy effects before enforcement.



/* Comments */
Comments are offline right now — we reconnect automatically, nothing is lost.