February 13, 2023
Subham Kundu
The foundation of modern software delivery process is Continuous Integration/Continuous Delivery (CI/CD) and all its supporting procedures and systems. They transfer code from a developer's workspace to production. The emergence of the DevOps discipline, together with CI/CD systems and methods, has changed the engineering ecosystem. But with the gaining popularity of CI/CD, it has become an attractive attack surface for cyber-attacks. The number, frequency, and severity of events and attack vectors exploiting weaknesses in the CI/CD ecosystems are significantly increasing in the industry. Here are some of the more popular incidents:
To counter attacks like these and helping organizations build robust defence systems, the OWASP foundation has released a report that mentions the top 10 security threats to CI/CD pipelines. Let’s explore these 10 threats and review how we at Caravel Labs mitigate these issues to build robust and reliable software for our clients. We will divide this post into a two-article series, where we explore five issues in each.
1. Insufficient Flow Control Mechanisms
Insufficient flow control mechanisms refer to the ability of an attacker that has obtained permissions to a system within the CI/CD process (SCM, CI, Artifact repository, etc.) to push malicious code or artifacts down the pipeline, due to a lack of mechanisms that enforce additional approval or review.
How we address this?
2. Inadequate Identity and Access Management
Inadequate Identity and Access Management risks stem from the difficulties in managing the number of identities spread across the different systems in the engineering ecosystem, from source control to deployment. Multiple systems are interconnected in software delivery procedures with the goal of transferring code and artifacts from development to production. Passwords and access tokens are just a few of the access and integration options offered by each system. Some of the major concerns in Inadequate Identity and Access Management are:
How we address this?
3. Dependency Chain Abuse
Dependency chain abuse risks refer to an attacker’s ability to abuse flaws relating to how engineering workstations and build environments fetch code dependencies. Dependency chain abuse results in a malicious package inadvertently being fetched and executed locally when pulled. Most of the time, packages are downloaded using a specific client for each programming language, typically from language-specific repositories (for instance, Node.js has npm and the npm registry, Python has pip and uses PyPI).
The typical attacks in these scenarios are as follows:
Dependency chain abuse can have a significant impact as the attacker can send malicious code directly to production. Some of the well-known incidents:
How we address this:
4. Poisoned Pipeline Execution (PPE)
Poisoned Pipeline Execution (PPE) risks refer to the ability of an attacker with access to source control systems - and without access to the build environment, to manipulate the build process by injecting malicious code/commands into the build pipeline configuration, essentially ‘poisoning’ the pipeline and running malicious code as part of the build process. A successful PPE attack has very significant impacts such as:
Some well-known incidents in the news:
How we address this:
5. Insufficient Pipeline Based Access Control (PBAC)
The resources and systems available to pipeline execution nodes both inside and outside the execution environment are extensive. Adversaries exploit Insufficient PBAC (Pipeline-Based Access Controls) while executing malicious code within a pipeline to take advantage of the authorization provided to the pipeline for lateral movement inside or outside the CI/CD system.
Pipelines are the beating heart of the CI/CD pipelines. PBAC is a term which refers to the context in which each pipeline and each step within that pipeline is running. PBAC includes controls relating to numerous elements having to do with the pipeline execution environment:
Some of the well-known incidents are:
© 2023 Caravel Labs - All rights reserved.