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 →
- Pin to a full commit SHA with the version in a comment:
uses: actions/checkout@<40-char-sha> # v4.2.2. - Let Dependabot update pinned SHAs for
github-actions. - Restrict allowed actions at org level (GitHub-owned and verified creators, or an allow-list).
- 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.
More on Secrets, Signing and Security
A developer pushed an AWS access key to a public repo 10 minutes ago. What is your first move?BeginnerAfter rotating the leaked key, you must purge it from repository history. How?AdvancedA push is rejected: "GH013: Repository rule violations found ... Push cannot contain secrets". What do you do?IntermediateSecret scanning alerts have piled up, and many look like false positives or old test credentials.IntermediateYou must set up signed commits on your laptop. Which method do you pick?BeginnerYour GPG signing key expires next week. What is the correct way to handle it?Intermediate