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.
More on Supply Chain and Pipeline Security
What is a software supply chain attack, and where does the pipeline fit?BeginnerWhat is an SBOM and why do you generate one in CI?BeginnerHow do you sign container images and verify them at deploy time?IntermediateWhat is SLSA and which level should a typical team aim for?IntermediateHow do you verify provenance before deploying?AdvancedHow do you scan images and dependencies in the pipeline without drowning in noise?Intermediate