GitHub Actions Fundamentals interview question

Why should you pin third-party actions to a commit SHA?

Why Asked in DevOps Engineer interviews

Members can save this page, take notes and track progress. See membership · Sign in

Summary

Tags such as @v3 can be moved by the action's owner or an attacker who compromises the repository, so your workflow would run new, unreviewed code with access to your secrets and token. A full commit SHA can't change. This happened in real supply-chain attacks (for example the tj-actions/changed-files compromise in 2025).

Keep reading with a membership

The full answer with examples, key points and comparisons is part of the membership, along with every other interview answer, progress tracking and Daily Review. Most-asked answers stay free to read.

See plans and free trial Already a member? Sign in

More GitHub Actions Fundamentals questions

← All GitHub Actions Fundamentals questions

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake