Unpinned floating tags (e.g. `v4`) on immutable Actions are not flagged by `actions/unpinned-tag`
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- security
調査の方向性
actions/ql/src/Security/CWE-829/UnpinnedActionsTag.ql と actions/ql/lib/codeql/actions/security/UseOfUnversionedImmutableAction.qll を読み、isImmutableAction と既存の SemVer predicate から始めます。完全な vX.Y.Z タグと完全な SHA は引き続き除外され、vX や vX.Y のような浮動参照は報告され、必要な変更ノートが含まれていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description of the issue
The actions/unpinned-tag query (actions/ql/src/Security/CWE-829/UnpinnedActionsTag.ql) exempts any Action on the immutable-actions allow list from the unpinned-tag warning, regardless of the ref used. The exclusion is version-independent:
not exists(UsesStep step | uses = step and isImmutableAction(step, nwo))
and isImmutableAction (actions/ql/lib/codeql/actions/security/UseOfUnversionedImmutableAction.qll) only checks membership in immutableActionsDataModel(nwo); it never inspects the version.
Why this is a gap
GitHub's immutability guarantee only applies to fully-expanded SemVer release tags (vX.Y.Z) and full commit SHAs. Floating tags such as v4, v4.0 and main remain mutable: maintainers move them to the latest matching release, so they can change under a consumer exactly like any other tag. See Using immutable releases and tags to manage your action's releases.
As a result, a reference like actions/checkout@v2 is flagged by neither query:
UnpinnedActionsTagskips it becauseactions/checkoutis on the immutable list.UnversionedImmutableActionskips it because itsisSemVerpredicate accepts a bare major tag likev2.
So a genuinely mutable floating tag on an immutable Action goes unwarned.
Suggested direction
Narrow the exemption so an immutable Action is only exempt when pinned to a full vX.Y.Z (or a SHA), for example:
not (isImmutableAction(step, nwo) and isFullSemVer(version))
with an isFullSemVer stricter than the current isSemVer (which also matches floating vX and vX.Y). This would need care because the immutable-action model is shared with the experimental UnversionedImmutableAction query, and it would increase alert volume for consumers pinning immutable Actions to floating major tags, so it deserves its own change note and review.
Filed as a follow-up to #22409 (which is scoped to the trusted-owner allow list and does not address this).
- 主要言語
- CodeQL
- スター
- 10.1k
- フォーク
- 2.1k
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 134
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/codeql のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
C#: cs/simplifiable-boolean-expression false positive on Nullable<bool> compared with a literal オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
false-positive
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
false-positive
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
sipyourdrink-ltd/bernstein#6191 ·
-
security severity:low track:open-source
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
[addtool] DeepZero オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
gwen001/offsectools_www#2055 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
WalletConnect/actions#112 ·