オープンソース依存関係のコンプライアンス維持における GitHub の取り組み
GitHub は、オープンソース依存関係のライセンス遵守を自動化・効率化するために、GitHub Advanced Security の新機能「License Compliance」を公開し、自社の OSPO もこれへ移行したと発表した。
キーポイント
ライセンス遵守の重要性とリスク
ソフトウェアには必ずライセンスが伴い、違反すると訴訟や評判損傷という重大なビジネスリスクを招くため、企業は自社のビジネスモデルに合わせたポリシーを持つ必要がある。
GitHub 新機能の導入と効果
GitHub は Advanced Security カスタマー向けにプルリクエスト上で依存関係のライセンスを直接レビューできる新機能を導入し、手動やサードパーティツールに依存していた従来のプロセスを革新した。
自社の OSPO による実証と移行
GitHub 自身のオープンソースプログラムオフィス(OSPO)は、2 か月前に社内独自ツールからこの新機能へ移行し、大規模で複雑なコンプライアンス要件を持つ企業でも使用可能であることを実証した。
段階的な導入と並行運用
まず「Evaluate」モードでプルリクエストに注釈を付与するだけでマージをブロックせず、既存ツールとの挙動比較を行いながら開発者に慣れさせる。
ルールベースの自動スキャンと例外処理
カスタムプロパティで対象リポジトリを指定し、依存関係の変更時にライセンスを自動スキャンする。問題が発生した場合はプルリクエストにアラートを付与し、承認が必要な場合は例外申請フローが用意されている。
グローバルなポリシーチームの体制
世界各地のタイムゾーンで構成されたポリシーレビューチームが、数時間以内にリクエストをトリージングし、SLAの正式化に向けた運用を行っている。
柔軟な例外管理とスコープ制御
ライセンスやパッケージの許可には企業レベルとリポジトリレベルの2段階があり、内部ソフトウェア向けにワイルドカードを使用した例外設定も可能です。
影響分析・編集コメントを表示
影響分析
この発表は、大規模なソフトウェア開発において、手作業や外部ツールに依存していたライセンス管理プロセスを GitHub のプラットフォーム内部で完結させる画期的なステップです。特に、GitHub 自身が自社の複雑な要件を満たすためにこの機能を採用し、実証した点は、同機能の信頼性と実用性を強く裏付けるものであり、業界全体におけるオープンソースガバナンスの標準化に寄与するでしょう。
編集コメント
本記事は、オープンソース利用における法的リスク管理の自動化という実務的な課題に対し、主要プラットフォームが提供する機能としての解決策を示しています。特に GitHub 自身が自社の運用にこの機能を適用している点は、その信頼性を示す強力な証拠と言えます。
毎日、GitHub のエンジニアたちは、GitHub プラットフォーム、社内アプリケーション、オープンソースプロジェクトに新しい依存関係(dependencies)を導入しています。GitHub は単なるオープンソースの拠点であるだけでなく、オープンソースによって支えられています!そして、オープンソースを責任を持って利用する上で重要な部分は、あなたが依存しているプロジェクトを規律づけるライセンスを尊重することです。
GitHub では、オープンソースコミュニティおよび私たちが使用する依存関係に対する義務を果たすことにコミットしています。ここでは、私たちのオープンソースプログラムオフィス(OSPO)が、新しい GitHub ライセンスコンプライアンス機能を使用して数千の依存関係をどのように管理しているかをご紹介します。
オープンソースライセンスのコンプライアンスプロセスの管理
ほぼすべてのソフトウェアには何らかのライセンス契約が付随しています。このライセンスは、あなたがそのプロジェクトの使用義務を遵守する限り、プロジェクトを使用することを許可します。これらの義務は、ドキュメントで元の著者にクレジットを与えるという単純なものから、プログラムを配布する際にソースコード全体を公開するというものまで様々です。場合によっては、ライセンスが特定の活動や使用カテゴリを制限することもあります。
あなたの組織には、ビジネスモデル、ソフトウェアエコシステム、および配布戦略に基づいた、許容されるライセンスに関する独自のポリシーがあるはずです。例えば、あなたが組織で商用のクローズドソースバイナリアプリケーションを販売している場合、独自コードをオープンソース化することを要求する依存関係を防止したいと思うかもしれません。
あるいは、オープンソースパッケージとしてリリースする予定のプロジェクトを持っている場合かもしれません。この場合、商用ライセンスや互換性のないオープンソースライセンスによって管理される依存関係を含めないようにしたいと考えられるでしょう。
どちらのシナリオでも必要な義務を遵守できない場合は、法的または運用上のリスクを防ぐために、その依存関係を避けるべきです。後からこれらのライセンスを削除するにはエンジニアリングの労力が必要になる可能性があります。エンタープライズソフトウェアにおいては、非コンプライアンスによるビジネスリスクは極めて大きく、高額の訴訟や評判の毀損につながる恐れがあります。
従来、ライセンスレビューは手動またはサードパーティ製ソフトウェアによって行われていました。しかし現在、GitHub は GitHub Advanced Security の顧客向けにライセンスコンプライアンス機能を提供しており、プルリクエスト上で新しい依存関係を直接レビューできるようになりました。このレビューにより、それらの依存関係のライセンスがポリシーに準拠していることを確認できるだけでなく、新しいライセンスや個別プロジェクトを許可するようにポリシーを拡張する柔軟性も提供されます。
2 ヶ月前、GitHub の OSPO は、コンプライアンス管理のために自社で構築した社内専用ツールから、この新機能へ移行しました。早期採用者として、私たちは開発チームに迅速なフィードバックを提供し、複雑なコンプライアンス要件を持つ大規模で高速に変化する企業においても、この機能が基準を満たすことを確保する手助けをしました。
ポリシー成功のための設定
GitHub は製品導入前に内部のライセンスコンプライアンスツールを構築していたため、初期ポリシーとして使用する既存の許容リストを持っていました。多くの依存関係が MIT、Apache 2.0、BSD-3-Clause といった一般的な寛容なライセンスを使用していることに気づくでしょう。これらはポリシーを策定するための良好な出発点となります。当初は、「評価」モードで組織全体のルールセットにこの機能を展開し、プルリクエストに注釈を付与するもののマージをブロックしないようにしました。これにより、開発者の生産性を阻害することなく、新しいワークフローに慣れさせることができました。旧ツールと新ツールを並行して実行したことで、両者の挙動が乖離していないかも確認できました。この運用モードで約 1 ヶ月を経た結果、アラートは主に、異常なライセンス、未記載のライセンス、または明示的に禁止されたライセンスを持つパッケージに集中する状態となりました。

GitHub のライセンスコンプライアンスの仕組み
内部では、ライセンス準拠チェックはルールセットを通じて有効化されています。対象となるリポジトリにはカスタムプロパティを指定し、そのプロパティの値によって「Active」モードまたは「Evaluate」モードでライセンスチェックが有効になるかが決定されます。ルールセットの対象となっているリポジトリにおいて、プロジェクトの依存関係を変更するプルリクエストが発生すると、各新しい依存関係で使用されているライセンスを検索するスキャンが実行されます。新しい依存関係のライセンスがすでに許可されている場合や、パッケージ固有の例外がある場合は、チェックは通過します。一方、直接または間接的な依存関係に問題がある場合、ツールはプルリクエストにコメントし、問題のある各パッケージに対するアラートを出力します。

開発者はその後、これらのアラートを確認します。依存関係が許容できないと判断された場合は、コードを更新するか、プルリクエストをクローズしてその依存関係を削除します。一方、ライセンスやパッケージの許可が必要だと考える場合は、例外申請を行うことができます。これにより、組織内の特定のチームに通知が行き、ポリシーの修正の有無および方法を決定する権限を持つチームが対応します。
ライセンスポリシーチームの1日
GitHub のライセンスポリシーチームは、OSPO(オープンソースプログラムオフィス)のメンバーと、ライセンスレビューおよびサプライチェーン分析に専門知識を持つエンジニアで構成されています。当社が世界中に展開する企業であるため、ポリシーレビューチームには時差を考慮した各地域のメンバーが在籍し、アラートを迅速に確認しています。現在、ライセンスリクエストの審査に関する SLA(サービスレベルアグリーメント)の整備を進めていますが、実際には新規リクエストのトリアージ(選別・優先順位付け)まで数時間以内に完了することがほとんどです。
チームメンバーは新しいレビュー依頼のメール通知を受け取り、またダッシュボードにアクセスして保留中のリクエストのバックログを確認することもできます。
リクエストを承認する際、私たちは2つの判断ポイントを持っています。まず、ライセンスまたはパッケージを許可するかどうかです。次に、適用範囲としてエンタープライズレベルかリポジトリレベルのどちらを使用するかを決定します。安全なライセンスで以前に出現したことがないものについては、エンタープライズレベルで追加し、GitHub 上のどこでもそのライセンスを持つ依存関係を許可できるようにします。一部のパッケージは商用ライセンスを持っており、すべての場所で許可することはできませんが、ソフトウェアを購入したチームが所有するリポジトリ内では許可されるべきです。そのため、これらのポリシー改正はリポジトリレベルで追加されます。パッケージ例外は、通常ライセンスデータが関連付けられていない内部ソフトウェアに対して有用です。便利なことに、このツールはパッケージ例外に対するワイルドカード一致をサポートしています。例えば、@github-ui/* React ネームスペース内のすべてを許可しているため、それらのパッケージを一つずつ承認する必要はありません。
開発者にとっての使いやすさ
このプロセスを支援するため、GitHub OSPO への連絡方法や、緊急時の「ブレークグラス」オーバーライドの使用方法に関する手順を整備しました。こうした状況は稀であるべきですが、時間的制約が極めて厳しいプルリクエストに対しては、明確な緊急オーバーライドのプロセスが不可欠です。前述した通り、ライセンスポリシーの適用はルールセットを通じて行われ、その条件はカスタムプロパティに依存しています。したがって、このプロパティの値を切り替えることで、ライセンスアラートによってブロックされている重要な修正が必要な場合に、一時的に適用を無効化することができます。これまでにこの機能を使用したのは一度きりでしたが、選択肢として用意されていたことは非常に役立ちました。
また、開発者がライセンスコンプライアンスの重要性を理解できるよう、内部ドキュメントとトレーニングも提供しています。究極的には、コンプライアンスの確保とリスク管理は全員の仕事であり、私たちがそのプロセスを可能な限り容易にする役割を担っています。
まとめ
ライセンスコンプライアンスは、ソフトウェアサプライチェーンを管理する上で極めて重要な要素です。開発者が GitHub のライセンスポリシーに合致した依存関係を選択できるよう支援することで、高価な書き直しや潜在的な法的問題を防いでいます。私たちは数ヶ月にわたり、新しい GitHub License Compliance 機能を積極的に利用し、フィードバックを提供してきました。現在、この機能がパブリックプレビュー段階に入ったことで、より多くの企業が採用する様子を楽しみにしており、これから始められる方々にとって私たちの経験が何らかの指針となれば幸いです。
GitHub Enterprise Cloud のお客様は、アクティブな GHAS Code Security ライセンスを保有するリポジトリ全体で、ライセンスコンプライアンス機能を利用できます。詳細については、「オープンソースライセンスのコンプライアンスについて」をご覧ください。
「GitHub がオープンソース依存関係のコンプライアンスをどのように維持しているか」という記事は、最初に The GitHub Blog で公開されました。
原文を表示
Every day, GitHub engineers introduce new dependencies into the GitHub platform, internal applications, and open source projects. GitHub is not just the home of open source; it is powered by open source! And an important part of using open source responsibly is respecting the licenses that govern the projects you depend on.
At GitHub, we are committed to upholding our obligations to the open source community and to the dependencies we use. Here’s how our Open Source Program Office (OSPO) uses the new GitHub License Compliance feature to manage thousands of dependencies.
Managing the open source license compliance process
Nearly all software carries some kind of license agreement. The license gives you permission to use a project, provided you comply with its obligations. Those obligations may be as simple as giving credit to the original author in your documentation, or they may require you to distribute all your source code when shipping your program. In some cases, licenses may also restrict certain activities or categories of use.
Your organization likely has its own policies about acceptable licenses based on your business model, software ecosystem, and distribution strategy. For example, suppose your organization sells a commercial, closed source binary application. You may want to prevent dependencies that would require you to open source your proprietary code.
Or, you may have a project that you plan to release as an open source package. In this case, you may want to avoid including dependencies governed by commercial or incompatible open source licenses.
If you can’t comply with the obligations required in either scenario, you should avoid the dependency to prevent legal or operational risks. It may require engineering effort to remove these licenses after the fact. For enterprise software, the business risk of noncompliance is huge because it can lead to costly litigation and reputational damage.
Traditionally, license reviews have been performed manually or with third-party software. But now, GitHub has introduced a license compliance feature for GitHub Advanced Security customers, enabling you to review new dependencies directly on pull requests. This review helps ensure that the licenses for those dependencies’ comply with your policy, while also giving you the flexibility to expand your policy to allow new licenses or individual projects.
Two months ago, GitHub’s OSPO migrated from internal-only tools that we’d built to manage compliance onto the new feature. As early adopters, we gave the development team quick feedback and helped ensure the feature would clear the bar for large, fast-moving enterprises with complex compliance requirements.
Setting up for policy success
Because GitHub had built internal license compliance tools prior to the introduction of the product, we had an existing list of acceptable licenses to use as our initial policy. You’ll likely find that many dependencies use common permissive licenses such as MIT, Apache 2.0, and BSD-3-Clause, which are a good starting list to seed your policy. We initially rolled the feature out using the “Evaluate” mode on an organization-wide ruleset, which generated annotations in pull requests without blocking merges, so we were able to get developers accustomed to the new workflow without impeding their productivity. Running the old and new tools in parallel also let us see if their behavior diverged. After about a month of this mode of operation, we got to a state where the alerts were mainly on packages with unusual, missing, or explicitly disallowed licenses.

How GitHub license compliance works
Under the hood, license compliance checks are enabled via rulesets. We target repositories via a custom property, where the value of the property determines whether license checks are enabled in “Active” or “Evaluate” mode. In repositories that are targeted by a ruleset, pull requests that modify a project’s dependencies trigger a scan that looks up the licenses used by each of the new dependencies. If the new dependencies’ licenses are already permitted, or there are package-specific exceptions, the checks pass. If there are failures, either in the direct or transitive dependencies, the tool comments on the pull request with alerts for each problematic package.

The developer then reviews the alerts. If they decide the dependency is unacceptable, they can update their code or close the pull request to remove it. If they believe the license or package should be allowed, they can raise an exception request which will notify a specific team in the organization who can decide whether and how to amend the policy.
A day in the life of the license policy team
GitHub’s license policy team consists of OSPO members and engineers with expertise in license reviews and supply chain analysis. Since we are a worldwide company, our policy review team has members across time zones to review alerts in a timely manner. We are in the process of formalizing an SLA for reviewing license requests, but in practice it’s rarely more than a couple of hours before we can triage an incoming request.
Team members receive email notifications of new review requests and can also access a dashboard to see the backlog of pending requests.

When approving a request, we have two decision points: first, whether to permit the license or the package. Then, decide what scope – enterprise or repository – to use. If it’s a safe license that simply hasn’t shown up before, we’ll add it at the enterprise level and thus allow dependencies with that license anywhere at GitHub. Some packages carry a commercial license which can’t be permitted everywhere but should be allowed in the repository owned by a team which has paid for the software, so those policy amendments get added at the repository level. Package exceptions are useful for internal software which usually doesn’t have license data associated with it. Helpfully, the tool supports wildcard matches for package exceptions. For example, we’ve permitted everything in the @github-ui/* React namespace, so we don’t need to approve those packages one by one.
Making it easy for developers
To support this process, we’ve established procedures about contacting the GitHub OSPO, and how to use an emergency “break glass” override. These situations should be rare, but a clear emergency override process is essential for critically time-sensitive pull requests. As we mentioned above, the license policy enforcement happens via ruleset, and the ruleset condition keys off a custom property. So toggling the value of the property can temporarily turn off enforcement if there’s a critical fix that’s blocked by a license alert. So far, we’ve only needed to use this once, but it was very helpful to have the option.
We’ve also provided internal documentation and training to help developers understand the importance of license compliance. Ultimately, it’s everyone’s job to help ensure compliance and manage risk and it’s our job to make that as easy as possible.
Wrapping up
License compliance is a critical part of managing our software supply chain. By helping developers make informed dependency choices aligned with GitHub’s license policy we prevent costly rewrites and potential legal problems. We’ve been enthusiastically using and providing feedback on the new GitHub License Compliance feature for several months. Now that it’s in public preview, we are excited to see more companies adopt it and hope our experience provides some guidance if you’re just getting started.
GitHub Enterprise Cloud customers can use the License Compliance feature across repositories which have an active GHAS Code Security license. For more information, see About open source license compliance.
The post How GitHub maintains compliance for open source dependencies appeared first on The GitHub Blog.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み