VOOZH about

URL: https://thenewstack.io/not-your-usual-supply-chain-hack-the-codecov-bash-uploader-blunder/

⇱ Not Your Usual Supply Chain Hack: The Codecov Bash Uploader Blunder - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2021-04-21 09:24:31
Not Your Usual Supply Chain Hack: The Codecov Bash Uploader Blunder
in-depth-news,
CI/CD / Open Source / Security

Not Your Usual Supply Chain Hack: The Codecov Bash Uploader Blunder

Codecov, a tool for uploading environmental data into continuous integration environs, has been compromised.
Apr 21st, 2021 9:24am by Steven J. Vaughan-Nichols
👁 Featued image for: Not Your Usual Supply Chain Hack: The Codecov Bash Uploader Blunder
Feature Image par ElephantPants de Pixabay

We all know about the SolarWinds supply chain hack. But, while smaller in scope, Codecov‘s Bash Uploader Security supply chain failure is also a record-setter. And, this is not a record anyone wants to break.

Months after their code was busted  Codecov only discovered the foul-up, thanks to a security-conscious user. He checked the Secure Hash Algorithm 1 (SHA-1) checksum for the Github version of Codecov Bash Uploader and the SHA-1 checksum for the downloaded Bash Uploader version with shasum — a Linux program that calculates and verifies SHA-1 hashes — and found they didn’t match. In other words, they were not the same program.

Whoops!

Codecov is a reporting tool that inserts coverage metrics directly into continuous integration (CI) workflows. Its job is to watch for coding problems while running test suites. It especially looks in pull requests where new features and bug fixes are usually found and new bugs and problems often pop up.

Bash Uploader’s task is to export users’ CI environmental data. This includes any credentials, tokens, or keys users were working within their CI runner when the Bash Uploader script was executed. That’s already dangerous enough because its name is perfectly descriptive. Bash Uploader uses the Bash shell and curl to upload unencrypted environmental data to Codecov. And, oh yes, to the attacker’s server as well.

This method of sending data was just asking for trouble. As a Slashdot reader said, “Piping a URL you don’t control directly into Bash… what could possibly go wrong?” I mean, there is literally a Hall of Shame webpage for people who make this blunder.

Adding insult to injury, the Bash Uploader is also used in three related uploaders: Codecov-actions uploader for GitHub, the Codecov CircleCl Orb, and the Codecov Bitrise Step, so if you used Codecov’s uploaders with any of these you were tagged by this problem.

So what could happen to you? Glad you asked. According to the company, the altered Bash Uploader script might affect:

  • Any credentials, tokens, or keys that our customers were passing through their CI runner that would be accessible when the Bash Uploader script was executed.
  • Any services, datastores, and application code that could be accessed with these credentials, tokens, or keys.
  • The git remote information (URL of the origin repository) of repositories using the Bash Uploaders to upload coverage to Codecov in CI.

If you think it through, as one Ycombinator reader did, this means “So the hackers stole every environment variable for the context in which the Codecov script was run. It means that if you use CI to deploy your code, all of your credentials have been leaked.”

So, how long did this go on? The company reported there was periodic, unauthorized access to the company’s Google Cloud Storage (GCS) key beginning January 31, 2021. This enabled a malicious third-party to alter its bash uploader script to potentially export CI to a third-party server until April 1, 2021. No, that’s not an April Fool’s joke.

This is what I like to call a “Shoot me now” moment. As in, shoot me now rather than have to go into the executive suite and tell the CIO, CTO, and CISO that our CI data’s been hijacked for three months.

How did this happen? Somehow —  we don’t know exactly how — the attacker gained access to the code because of an error in Codecov’s Docker image creation process. This enabled the hacker to extract the credential required to modify the Bash Uploader script. With that unauthorized access, they modified the script to export the CI data to a third-party server.

The only “good” news here, according to  a Ycombinator comment ascribed to Eli Hooten, Codecov’s chief technology officer, “Based on the nature of this attack I do not believe malicious actions were executed directly against the CI pipeline, nor do we have any evidence of it.” If true, this break-in may have been a true hacker just poking at a system to see what they could find out rather than a cracker eager to monetize your data.

Not that matters for as far as what you need to do now. As Codecov states:

We strongly recommend affected users immediately re-roll all of their credentials, tokens, or keys located in the environment variables in their CI processes that used one of Codecov’s Bash Uploaders.

If you’ve been auditing how these tokens are used in your system, now would be a good time to start scanning your logs for unusual activity from the end of January to the beginning of April.

Codecov is saying all the right things now about securing their systems and auditing their code. But, with the horse already out of the barn, if I were one of their approximately 29,000 customers using its programs to check my code quality, I’d have a long, hard talk with them before I’d trust them with my CI data train.

I’d also take a deep look into their scripts to see if there are other problems lurking about. Finally, few people bother to check SHA-1 and other checksums for problems between what a program says it is and what it really is. It’s time to start. After all, checking these sums with programs such as shasum and sha256sum can be automated by pipelining them in a Bash script. This would make using curl in a script like Bash Uploader safer.

TRENDING STORIES
Steven J. Vaughan-Nichols, aka sjvn, has been writing about technology and the business of technology since CP/M-80 was the cutting-edge PC operating system, 300bps was a fast internet connection, WordStar was the state-of-the-art word processor, and we liked it.
Read more from Steven J. Vaughan-Nichols
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Docker, Bitrise, SolarWinds.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.