→ Back to Home
Cloud Security

Securing CI/CD for an open source project: Controlling who runs what

The Cloud Native Computing Foundation (CNCF) has released a crucial article, "Securing CI/CD for an open source project: Controlling who runs what," offering an in-depth look into the security practices employed by the Cilium project to safeguard its continuous integration and continuous delivery (CI/CD) pipelines. Published on June 4, 2026, this piece is the first in a three-part series aimed at sharing practical, actionable strategies for hardening open-source projects against the growing threat of supply chain attacks, a concern that has become increasingly prominent in the cloud-native landscape. The article underscores the significant blast radius a compromised CI/CD pipeline can have, especially for foundational projects like Cilium, which operates at the kernel-level networking path for millions of Kubernetes pods. The core of this initial installment focuses on access control: meticulously defining who can initiate builds and precisely what code the CI system is authorized to execute. The Cilium maintainers have implemented a multi-layered defense strategy, primarily leveraging GitHub Actions, to achieve this. Their approach is designed to be largely project-agnostic, meaning many of the patterns and mechanisms discussed can be adopted by other open-source projects utilizing similar CI/CD setups. One of the primary mechanisms highlighted is **Ariane**, an internally developed GitHub bot. This bot plays a pivotal role in restricting workflow triggers. In an open-source project, pull requests from external contributors are common, and without proper controls, a malicious actor could potentially trigger expensive or harmful CI workflows. Ariane addresses this by enforcing an explicit allowlist, ensuring that only verified organization members can dispatch CI workflows from pull request comments, for instance, by typing commands like `/test` or `/ci-eks`. The bot intelligently identifies which workflows to fire, including any dependencies, and then dispatches them via `workflow_dispatch`. This prevents unauthorized individuals from consuming valuable CI minutes or launching resource-intensive conformance suites. Another critical security measure detailed is the **two-phase checkout pattern for `pull_request_target` workflows**. This sophisticated technique is designed to prevent untrusted code from pull requests from executing with elevated privileges. In essence, it creates a clear separation: the initial phase of the workflow runs with limited permissions, only checking out the trusted base branch code. This ensures that any scripts or configurations supplied by a contributor in their pull request are never executed directly with the full permissions of the CI system. Only after a rigorous review and explicit approval can the untrusted code be safely integrated and executed in a controlled environment, significantly reducing the risk of malicious code injection into the build process. This pattern is particularly vital for open-source projects where contributions come from a wide array of sources, not all of which can be implicitly trusted. Finally, the article emphasizes the importance of **`CODEOWNERS` rules** within the GitHub repository. These rules are configured to mandate that any changes to the CI pipeline configuration, typically found under the `.github/` directory, must undergo an explicit review by a dedicated security-focused CI team. This acts as a crucial gate, preventing any single individual or unreviewed change from compromising the CI infrastructure. The `CODEOWNERS` file ensures that a maintainer's approval is required for sensitive configurations, such as `auto-approve.yaml`, adding a layer of human oversight and expertise to critical security decisions. This collaborative review process is essential for maintaining the integrity of the CI/CD pipeline and protecting against accidental misconfigurations or deliberate attacks. The authors, André Martins and Feroz Salam from Isovalent at Cisco, who are also Cilium maintainers and security engineers, respectively, underscore that while these practices are implemented within Cilium, their underlying principles are broadly applicable. They also candidly acknowledge areas where the project continues to refine its security posture, offering a realistic perspective on the ongoing challenge of securing complex open-source infrastructure. This first part of the series sets the stage for deeper dives into dependency hardening and credential isolation, which will be covered in subsequent articles. The insights provided by the Cilium team, shared through the CNCF blog, offer invaluable guidance for any organization or project striving to enhance the security of its cloud-native CI/CD pipelines and protect against the ever-evolving landscape of software supply chain threats. The emphasis on robust access control, careful code execution, and mandatory security reviews forms a foundational defense against potential compromises, ensuring the continued trustworthiness of critical open-source components.
#ci/cd#cloud security#open source#github actions#supply chain security#cilium
Read original source