github / github/codeql

GHAS-managed workflows reference mutable action versions, incompatible with required SHA-pinning policies

オープン
#21,732 コメント 7 件 リアクション 5 件 担当者 0 名 GitHub で見る
question
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
141

説明

## Summary

GitHub Advanced Security (including dynamic analysis and Copilot code review) uses GitHub Actions workflows that reference external actions by mutable labels (e.g. `actions/setup-dotnet@v5`). When an organization enables the recommended policy **“Require actions to be pinned to a full-length commit SHA”**, these workflows fail or remain indefinitely queued.

This puts customers in a position where they must weaken their supply-chain security posture in order to run GitHub’s own security tooling, which should not be required.

## Details

We have an organization with the following Actions policies enabled:

* Require actions to be pinned to a full-length commit SHA
* Allow select actions and reusable workflows (deny by default)

With this posture:

* GitHub Advanced Security **dynamic analysis** fails to run because it references actions such as:
* `actions/setup-dotnet@v5`
* The **Copilot code review** dynamic workflow now fails for the same reason, due to additional external actions referenced by mutable tags

These workflows are **GitHub-managed** and **not user-editable**, so customers cannot remediate the issue by pinning SHAs themselves.

## Expected behavior

GitHub Advanced Security and Copilot security workflows should be compatible with GitHub’s own recommended supply‑chain security controls.

At least one of the following should be true:

* GitHub-managed workflows use **full commit SHAs**, or
* GitHub provides an explicit **first‑party exemption mechanism** that does not require weakening org policy, or
* GitHub publishes **documented, pinned equivalents** for first‑party security workflows

## Actual behavior

* GHAS workflows fail or remain indefinitely queued
* Customers are forced to choose between:
* Enforcing SHA pinning (recommended best practice), or
* Running GitHub’s security tools

There is currently no supported way to do both without introducing a policy exception.

## Impact

* Forces security-conscious customers to weaken their supply-chain controls
* Creates audit and compliance issues (especially for regulated environments)
* Undermines the guidance GitHub itself provides around SHA-pinning
* Affects multiple first‑party security features (dynamic analysis, Copilot code review)

This is not limited to a single action or language ecosystem.

## Reproduction (high level)

1. Enable GHAS dynamic analysis and/or Copilot code review
2. Enable **Require actions to be pinned to a full-length commit SHA**
3. Restrict allowed actions to an allow-list
4. Trigger a PR or default branch run
5. Observe GHAS-managed workflows failing or stuck in `queued`

## Additional context

* Customers cannot edit or fork GHAS-managed workflows
* These are first‑party GitHub security tools
* The workaround today is to relax Actions policies, which contradicts GitHub security guidance

Happy to provide additional diagnostics if needed.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with the GHAS dynamic analysis and Copilot code review workflows described in the reproduction steps, then verify their behavior with full-length SHA pinning and an allow-list policy enabled. Done means the GitHub-managed workflows run successfully without weakening those policies or requiring customers to edit the workflows.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github-actions
領域
ci-cd, security
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。