# Breaking Out of CI Environments

- Speaker: [Rotem Bar](/wiki/speakers/rotem-bar.md), [Omer Gil](/wiki/speakers/omer-gil.md)
- Event: [Reversim Summit 2021](/wiki/years/2021.md)
- Video: https://www.youtube.com/watch?v=Y-LCKNytF1k
- Transcript: [/transcripts/2021/27-Y-LCKNytF1k.md](/transcripts/2021/27-Y-LCKNytF1k.md)
- Language: Hebrew · Type: talk · Level: intermediate
- Topics: [Security](/wiki/topics/security.md), [DevOps](/wiki/topics/devops.md), [Software Engineering](/wiki/topics/software-engineering.md), [Cloud Computing](/wiki/topics/cloud.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

This talk explores how attackers can compromise continuous integration and deployment (CI/CD) environments to reach production systems. The speakers present real-world attack vectors, demonstrating how compromising a single developer's repository access can lead to remote code execution within build pipelines. Additionally, the presentation covers a novel research angle where security scanners and code analysis tools themselves are weaponized to bypass defenses and exfiltrate cloud credentials. The audience learns about pipeline security risks and practical techniques to harden their software supply chains.

## Key points

- [0:12](https://www.youtube.com/watch?v=Y-LCKNytF1k&t=12s) The speakers introduce the concept of breaking out of CI/CD environments as a primary attack path for moving from development pipelines into production.
- [4:44](https://www.youtube.com/watch?v=Y-LCKNytF1k&t=284s) Common attack surfaces targeting production include direct perimeter breaches, cloud misconfigurations, and targeting developer workstations or CI/CD pipelines.
- [6:57](https://www.youtube.com/watch?v=Y-LCKNytF1k&t=417s) High-profile supply chain attacks like SolarWinds, Codecov, and compromised JavaScript libraries show that traditional perimeter defenses are insufficient against pipeline attacks.
- [13:38](https://www.youtube.com/watch?v=Y-LCKNytF1k&t=818s) The speakers introduce Poison Pipeline Execution (PPE) as a method where an attacker with source control write access manipulates build or configuration files to execute malicious code.
- [16:38](https://www.youtube.com/watch?v=Y-LCKNytF1k&t=998s) Direct PPE demonstrates how editing configuration files that run during pull request validation allows attackers to steal credentials without direct access to the CI system.
- [23:38](https://www.youtube.com/watch?v=Y-LCKNytF1k&t=1418s) Security scanners and infrastructure-as-code analysis tools integrated into pipelines can sometimes be subverted through malicious configuration files to bypass security checks.
- [27:48](https://www.youtube.com/watch?v=Y-LCKNytF1k&t=1668s) Linters and security tools that execute code via their configuration files, such as Robocop, can be leveraged to run arbitrary commands and extract cloud secrets.

## Takeaways

- Source control write access is a critical asset that must be heavily protected, as it can be leveraged to compromise entire build pipelines.
- Pipeline configuration files should be treated with the same security rigor as production deployment code.
- Security scanners and linters running inside CI should be isolated and configured securely to prevent them from becoming attack vectors.

## Questions this talk answers

- How can an attacker with only source control write access execute code in a CI/CD pipeline?
- What is Poison Pipeline Execution (PPE) and how does it bypass branch protection rules?
- How can security tools and linters running in a pipeline be exploited by malicious repository configurations?

## Technologies

Jenkins, GitHub, AWS, Node.js, Python, Ruby

## Tags

application security, ci/cd, cloud security, devsecops, infrastructure as code, supply chain security
