Why pin GitHub Actions to a commit SHA?

AdvancedConceptCI/CD
Answer

Tags like @v4 can be moved by the action's owner or by an attacker who compromises it. A full SHA is immutable, which protects against supply-chain attacks such as the 2025 tj-actions/changed-files compromise.

All Real-World Interview questions Roadmap: Interview readiness

More on CI/CD