Earlier quoted context omitted.
> compilers (like Rust compiler) allow running arbitrary code without any warning. It's safe to assume that the Rust compiler (like any compiler built on top of LLVM) has arbitrary code execution vulnerabilities, but as an intended feature I think this only exists in cargo, the popular/official build system, not rustc, the compiler.
Any language that supports constexpr, like Rust's const fn [0], can execute arbitrary code at compile time. [0] https://github.com/rust-lang/rust/issues/57563
How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
121–130 of 244 posts
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#122Effectively, many (most?) 3rd party github integrations basically ask you to type in your github ID. Then they use the github API and ask for maximal permissions. This lets them make it easy for you to use their services because they can do all the rest of the setup for you. But, NO ONE SHOULD EVER GIVE THIS KIND OF PERMISSION.
Any 3rd party service that said "give us root to your servers" would be laughed out of the market. But, that's what github has encouraged because their default workflow leaves it up to the developer to do the right thing.
Instead, github's auth UX should (1) require you to choose repos (2) not allow picking "all repos" (3) require to you select each and every permission (4) not have an option for "all permissions".
As an analogy (though poor). iOS and MacOS don't say "this app wants all these permissions, yes/no" (android used to do this). Instead, they ask one at a time (camera? mic? photos? network?) etc... I'm not suggesting that github ask one at a time. I am suggesting that github provide a default UI that lists all the permissions, per repo, and has no way to auto-populate it so the user is required to choose.
Further, I would argue that github should show the integrations and permissions for any repo. The hope being if I see "lib X uses integration Y with write permission" then I know lib X is not trustworthy because it's open to supply chain attacks (more than lib Z which has no write integrations)
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#123CodeRabbit response - https://www.coderabbit.ai/blog/our-response-to-the-january-2...
> No customer data was accessed and the vulnerability was quickly remediated within hours of disclosure How do they know this -- Do they have any audit logs confirming this? A malicious actor could have been using this for months for all they know
They know because it would affect their fundraising, so obviously customer data wasn't affected.
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#124CodeRabbit response - https://www.coderabbit.ai/blog/our-response-to-the-january-2...
How can CodeRabbit be certain that the GitHub App key was not exfiltrated and used to sign malicious tokens for customer repos (or even used for that in-situ)? I'm not sure if GitHub supports restricting the source IPs of API requests, but if it does, it'd be a trivial mitigation - and one that is absent from the blog post.
The claim that "no malicious activity occurred" implies that they audited the activities of every repo that used Rubocop (or any other potential unsandboxed tool) from the point that support was added for it until the point that the vulnerability was fixed. That's a big claim.
And why only publish this now, when the Kudelski article makes it to the top of HN, over six months after it was disclosed to them?
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#125Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#126I cancelled my coderabbit paid subscription, because it always worries me when a post has to go viral on HN for a company to even acknowledge an issue occurred. Their blogs are clean of any mention of this vulnerability and they don't have any new posts today either. I understand mistakes happen, but lack of transparency when these happen makes them look bad.
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#127Amateur level of security - what more is there to say?
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#128Earlier quoted context omitted.
Any language that supports constexpr, like Rust's const fn [0], can execute arbitrary code at compile time. [0] https://github.com/rust-lang/rust/issues/57563
Rust's const fns run in a restricted interpreter that does not allow for things like non-determinism, syscalls, unsound behavior, etc. They can neither read from nor write to "the environment" in any meaningful way. They don't even expose things like the host's pointer-size to the code being run.
Not a Rust-only problem, but one that people should be aware of in general.
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#129I cancelled my coderabbit paid subscription, because it always worries me when a post has to go viral on HN for a company to even acknowledge an issue occurred. Their blogs are clean of any mention of this vulnerability and they don't have any new posts today either. I understand mistakes happen, but lack of transparency when these happen makes them look bad.
https://www.coderabbit.ai/blog/our-response-to-the-january-2...
"No manual overrides, no exceptions."
"Our VDP isn't just a bug bounty—it's a security partnership"
Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos
#130> On January 24, 2025, security researchers from Kudelski Security disclosed a vulnerability to us through our Vulnerability Disclosure Program (VDP). The researchers identified that Rubocop, one of our tools, was running outside our secure sandbox environment—a configuration that deviated from our standard security protocols.
Honestly, that last part sounds like a lie. Why would one task run in a drastically different architectural situation, and it happen to be the one exploited?