Interview Prep/Git & GitHub/Secrets, Signing and Security

Your workflows use many third-party actions referenced by tag such as `@v3`. Is that a risk?

AdvancedScenarioSecrets, Signing and Security
Answer

Situation read → Tags can be moved, so a compromised action can change what you run, as happened with tj-actions/changed-files in 2025.

What I'd do →

  1. Pin to a full commit SHA with the version in a comment: uses: actions/checkout@<40-char-sha> # v4.2.2.
  2. Let Dependabot update pinned SHAs for github-actions.
  3. Restrict allowed actions at org level (GitHub-owned and verified creators, or an allow-list).
  4. Give workflows least-privilege permissions.

Why → A SHA is immutable, so the code you reviewed is the code that runs.

Interview tip → Mention both pinning and an allow-list.

All Git & GitHub questions Roadmap: Git & GitHub

More on Secrets, Signing and Security