Interview Prep/CI/CD/Supply Chain and Pipeline Security

How do you protect the CI system from malicious pull requests in public repositories?

IntermediateProductionSupply Chain and Pipeline Security
Answer

Require maintainer approval for workflows from first-time contributors, use hosted ephemeral runners only, give fork PRs no secrets and a read-only token, avoid pull_request_target with checkout of PR code, limit workflow permissions, set job timeouts to cap crypto-mining abuse, and watch for changes to workflow files or build scripts in PRs from unknown contributors.

All CI/CD questions

More on Supply Chain and Pipeline Security