logoalt Hacker News

aavci • yesterday at 1:39 AM • 2 replies • view on HN

How do you think this would have plausibly happened?


Replies

HiJon89 • yesterday at 4:04 AM

If for example the CI system is only expected to build private, trusted repositories, then builds may have access to publishing credentials in order to upload their own artifacts. But a bad actor could use those credentials to overwrite unrelated libraries with malicious versions that will get automatically picked up by other builds. Or if there is any sort of shared cache on the build server, a bad actor could potentially overwrite artifacts with malicious versions in that cache

➕ show 1 reply
darthwalsh • yesterday at 8:32 AM

I like HiJon89's answer, but I've also seen

``` def deployProd = branch_name() == "main" ```

and it's trivial for any commit to change that to `= True`

These systems are often designed where CI and CD have access to the same creds, and anybody "on the team who can push a branch" is trusted to not intentionally break things.

➕ show 1 reply