> While running the exploit, CodeRabbit would still review our pull request and post a comment on the GitHub PR saying that it detected a critical security risk, yet the application would happily execute our code because it wouldn’t understand that this was actually running on their production system. What a bizarre world we're living in, where computers can talk about how they're being hacked while it's happening. A…
Another proof that AI is not smart, it’s just really good at guessing.
How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
191–200 of 244 posts
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#192For check-all-the-things (meta-linter), we disable the rubocop default config file using the "--config /dev/null" options.
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#193> No customer data was accessed
As far as I can tell this is a lie.
The real answer is that they have absolutely no clue if customer data was accessed, and no way to tell. I'm not even sure Github could tell, but it's not clear if the exploits way of generating private keys to access private repositories is any different to what CodeRabbit does in normal operation.
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#194Yikes, this is a pretty bad vulnerability. It's good that they fixed it, but damning that it was ever a problem in the first place. Rule #1 of building any cloud platform analyzing user code is that you must run analyzers in isolated environments. Even beyond analysis tools frequently allowing direct code injection through plugins, linters/analyzers/compiler are complex software artifacts with large surface areas for…
Did I misread the article, or did they take the tool config from the PR not the repo?
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#195Earlier quoted context omitted.
They first disabled rubocop to prevent further exploit, then rotated keys. If they awaited deploying the fix that would mean letting compromised keys remain valid for 9 more hours. According to their response all other tools were already sandboxed. However their response doesn't remediate putting secrets into environment variables in the first place - that is apparently acceptable to them and sets off a red flag for…
"According to their response all other tools were already sandboxed." Everything else was fine, just this one tool chosen by the security researcher out of a dozen of tools was not sandboxed.
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#196Yikes, this is a pretty bad vulnerability. It's good that they fixed it, but damning that it was ever a problem in the first place. Rule #1 of building any cloud platform analyzing user code is that you must run analyzers in isolated environments. Even beyond analysis tools frequently allowing direct code injection through plugins, linters/analyzers/compiler are complex software artifacts with large surface areas for…
Did I misread the article, or did they take the tool config from the PR not the repo?
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#197> For defense in depth, one should add a mechanism that prevents sending private information to an attacker-controlled server. For example, only allow outgoing traffic to whitelisted hosts, if possible. If the tool doesn’t require internet access, then all network traffic may even be disabled in that isolated environment. This way it would make it harder for an attacker to exfiltrate secrets.
I yearn to live in a world where this is the default or at least REALLY EASY to do, where you just fall into the pit of success.
And yet, we live in a borderline insane world where one key getting leaked can pwn a million repos - if nothing else, there should be one key per interaction with account/repo. Not to mention that Rubocop (and probably other tools, eventually) have arbitrary code execution as a feature.
I don't think that CodeRabbit messed up, as much as everything around them is already messed up.
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#198Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#199> While running the exploit, CodeRabbit would still review our pull request and post a comment on the GitHub PR saying that it detected a critical security risk, yet the application would happily execute our code because it wouldn’t understand that this was actually running on their production system. What a bizarre world we're living in, where computers can talk about how they're being hacked while it's happening. A…