Unpinned floating tags (e.g. `v4`) on immutable Actions are not flagged by `actions/unpinned-tag`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- security
Direzione di ricerca
Leggi actions/ql/src/Security/CWE-829/UnpinnedActionsTag.ql e actions/ql/lib/codeql/actions/security/UseOfUnversionedImmutableAction.qll, iniziando da isImmutableAction e dal predicato SemVer esistente. Il lavoro è completo quando i tag vX.Y.Z completi e gli SHA completi continuano a essere esclusi, mentre vengono segnalati i riferimenti mobili come vX e vX.Y, includendo la nota di modifica richiesta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- CodeQL
- Stelle
- 10.1k
- Fork
- 2.1k
- Merge medio
- 2g 11h
- PR unite (30g)
- 129
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/codeql
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
C#: cs/simplifiable-boolean-expression false positive on Nullable<bool> compared with a literal Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
false-positive
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
False positive Apertafalse-positive
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
Tutte le issue di github/codeql
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
TheManticoreProject/Manticore#1383 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
ethereum-optimism/factory#64 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
phoenixframework/phoenix#6847 ·
-
intake mcp-intake needs-ac needs-human-review priority:medium type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Ikalus1988/MisakaNet#2019 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
SocialiteProviders/Providers#1493 ·