Poisoned Pipeline / Incidents / AS3
Codecov Breach
GitHub ActionsDocker / containers
Codecov is a popular code coverage utility that is used as stem in the CI/CD of many companies.
Mapped techniques
- T0103 Scan public artifacts for secrets
- T0142 Accidental public disclosure of internal resources
- T0114 Compromised service account
- T0191 Malicious code in artifacts
- T0118 Command injection
- T0122 Vulnerability in third-party CI/CD actions
- T0140 Harvest tokens from environment variables
- T0121 Compromised legitimate artifact
- T0159 Malicious artifact execution
- T0207 Skip or forge artifact integrity verification
- T0185 Steal credentials in container artifacts
- T0192 Sensitive information in logs
supply-chain Codecov
The attackers scanned Docker Hub and discovered git credentials in the official Codecov image
The git credentials was in-deliberately saved in the public docker image
The attackers gained access to Codecov's Git repo
The Bash Uploader script was modified to exfiltrate environment variables of the running system
post-supply-chain Codecov users
When the Codecov image was executed - the malicious implant in the Bash Uploader script exfiltrated environment variable to the attacker controlled
The Bash Uploader script was used as part of 3rd party Github actions
Customers that utilized the Codecov image were impacted
Customers ran the Bash Uploader as a curl-to-pipe helper with no
signature or checksum pin, so the rewritten script executed as Codecov.
Git credentials were left in the public Codecov Docker image — the
initial secret that unlocked the Bash Uploader rewrite.
The modified uploader exfiltrated CI environment data that often
also lands in build logs.