Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
For over two months in 2021, a modified Codecov Bash Uploader quietly sent the environment variables of thousands of CI pipelines — tokens, keys, and credentials — to an attacker-controlled server.

What Was the Codecov Incident?
Codecov is a code coverage reporting service. Thousands of software projects called its Bash Uploader script from their continuous integration pipelines with a single curl command piped into a shell. On 31 January 2021 an attacker modified that script on Codecov’s content delivery infrastructure, adding one line that sent the complete environment of every pipeline that ran it to an external IP address. It stayed there, undetected, until 1 April 2021.
The environment of a CI job is where the secrets live: cloud access keys, container registry credentials, signing keys, database passwords, API tokens, and repository tokens. The incident therefore amounted to a credential harvest from the build systems of a large proportion of the open source and commercial software world at once.
Codecov’s own post-incident notice attributed the access to an error in the process used to create one of its Docker images, which left a credential in the image that allowed the uploader script to be modified in its distribution bucket. The attacker added a line that collected the shell environment and posted it to a remote host. The script was fetched fresh on every build, so no version pinning protected anyone, and the change was invisible unless someone compared the downloaded file against the copy published on GitHub.
That is exactly how it was eventually found. On 1 April 2021 a customer verified the SHA-256 checksum of the script they had just downloaded against the hash in Codecov’s GitHub repository, found a mismatch, and reported it. Codecov notified customers publicly on 15 April 2021.
Because the harvested secrets were valid credentials for other systems, the incident propagated outward:
Few victims could say with certainty what had been taken, because most CI platforms do not log the contents of environment variables and outbound connections from build agents were rarely monitored.
Codecov made an abstract risk concrete. The pattern curl … | bash had been criticised for years and defended as pragmatic, and the incident demonstrated the consequence precisely: the build pipeline is production infrastructure, and a dependency fetched at run time is a dependency you have not reviewed.
It also reframed CI secrets. A long-lived cloud access key stored as a pipeline variable is not a configuration detail. It is a durable credential sitting in an environment that executes third-party code on every commit.
The incident sits alongside SolarWinds and the event-stream package attack in the modern supply chain attack canon, and it is the one that speaks most directly to development teams rather than to procurement.
Reviewing pipeline permissions, secret handling, and build integrity is part of our application security services, and it tends to be the quickest win available in a mature DevOps environment.
The modified uploader exported the environment variables of each continuous integration job that ran it and sent them to an attacker-controlled server. In practice that meant cloud access keys, registry and repository tokens, signing keys, database credentials, and anything else a pipeline had been given. Source code was not taken directly, but several downstream organisations lost code using the harvested credentials.
A customer compared the SHA-256 checksum of the Bash Uploader they had just downloaded with the hash published in Codecov’s GitHub repository and found that the two did not match. They reported it on 1 April 2021. No automated control caught it in the preceding two months, which is the most uncomfortable detail of the whole case.
It is a risk decision rather than an absolute, but the safer pattern is cheap. Download the script to a file, verify a published signature or hash, pin a specific version, then execute it. Where the supplier offers a container image with a digest or a package from a signed repository, prefer that. The convenience saved by piping is not worth the exposure.
Replace static cloud keys with short-lived federated credentials issued per job, scope every token to the minimum repository and action, pin and verify any tool fetched at build time, restrict outbound network access from build agents, and make full secret rotation a rehearsed operation. Also enable secret scanning so exposures surface quickly rather than during an incident.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.