During a supply-chain hardening review, an engineer must classify which uses reference for a third-party action is genuinely immutable, meaning the referenced code cannot be changed afterwards by the action's maintainer. Which of the following references meets that immutability requirement?
# candidate references
uses: vendor/scan-action@v2
uses: vendor/scan-action@v2.4.0
uses: vendor/scan-action@release-2024
uses: vendor/scan-action@9f3a2c1d4e5b6a7c8d9e0f1a2b3c4d5e6f7a8b9c- AThe major version reference vendor/scan-action@v2, because a major version tag is protected from being moved once downstream consumers depend on it widely.
- BThe patch version reference vendor/scan-action@v2.4.0, because a fully qualified release tag is frozen to its published assets and is rejected if the maintainer tries to move it.
- CThe full commit SHA reference vendor/scan-action@9f3a2c1d4e5b6a7c8d9e0f1a2b3c4d5e6f7a8b9c, because a commit SHA addresses one fixed commit that cannot later be reassigned to different code. Correct
- DThe named branch reference vendor/scan-action@release-2024, because a dedicated release branch is locked after publication so its tip commit stays fixed for that release year.
Why A is wrong: Tempting because major version tags are the documented convenience, but v2 is a mutable tag the maintainer can re-point to any commit at will, so it is not immutable regardless of how many consumers depend on it.
Why B is wrong: Tempting because a patch tag looks final, but GitHub does not prevent a maintainer from deleting and recreating v2.4.0 against different code, so a release tag is still a mutable reference.
Why C is correct: A 40-character commit SHA is a content-addressed identifier for a single commit, so the maintainer cannot reassign it to other code, making it the only genuinely immutable reference among the candidates.
Why D is wrong: Tempting because a release branch sounds stable, but a branch reference resolves to the current tip and advances on every push, so it is among the least stable references rather than immutable.