Interview Prep/Git & GitHub/Security: secrets, signing, access and supply chain

How do you secure the CI path for pull requests from forks of a public repo?

AdvancedProductionSecurity: secrets, signing, access and supply chain
Answer

Use pull_request (no secrets) for untrusted code, require approval for first-time and all outside contributors' workflow runs, and do privileged follow-up work (labeling, commenting) in a separate workflow_run workflow that never checks out or executes PR code, only consumes sanitised artifacts. Set tokens to read-only by default.

All Git & GitHub questions Roadmap: Git & GitHub

More on Security: secrets, signing, access and supply chain