Posted by lxhrstn 1 hour ago
In the past, I haven't worried about attacks just because I'm too small of a fish to make sense for an attacker's ROI calculation, but now with automated LLM-enabled attacks, the threat vector is definitely changing. Even still, I'm pretty confident in the overall shape of the attack surface.
I keep an unused Bitwarden subscription to support them (since I'm still using their Android + web + extension clients).
Interesting that their is no code review in place and the attacker could just deploy something.
- If there's an external coding agent (copilot can be properly setup), if you can invoke `@codex` in a pull request to open a new pull request, you can then approve this agent-generated PR and merge it without human oversight
- If you don't have the "review the last reviewable commit" activated, someone can find an old unmerged but approved PR, add something in it and merge
- If you don't have the "dismiss previous approvals on push" setup with codeowners, if you have access to a github app with write access to the repo, you can find an old unmerged PR, push changes, use the app to approve your PR and merge (this can be protected by having a ruleset that require a review from at least 1 human with a team that does not contain the bots/app)
- If you're a GitHub repo admin, the ruleset might allow you to merge without review
- If you're a GitHub organization admin, you can disable rulesets, merge, and reenable them right away, making the attack very sneaky. Or just exclude your target repository.
- If users have the possibility to create blank repositories, then you can commit directly to main branch on the first commit, even though you have a ruleset that mandates pull requests. This works because the branch does not exist yet.
- If users have the possibility to create branches, a user can create a malicious protected branch, bypassing restrictions for the same reason as the previous point. Example : your ruleset protect `main` and `master` for backward compatibility. If user can create branches, they can push to a `master` branch on a repo where `main` is the main branch, bypassing restrictions.
There are multiple ways to get it wrong in GitHub and most people are not aware of these tradeoffs.
GitHub permissions are a joke. Github is more akin to a social network than an enterprise tool with regards to identity and RBAC. It’s a lot harder than it should be to give people autonomy without allowing abuse.
You are also right that it's possible to have a secure setup, however there are multiple ways to get it wrong (see my other reply in the parent thread).
Mandating PRs has multiple benefits, but one of which is to prevent a single malicious actor from unanimously getting changes into production.
Would hope that has significant hoops to jump through.
In this breach, someone's GitHub was accessed. If that GH was part of the release engineering process then what's stopping a sneaky-bad-release going out, that POSTs your secrets to an attacker in some way? Or something more dubious, with more steps, but less detectable.
You're not just trusting them to do one-time-encryption, you're trusting them to forever deliver safe software over xThousand releases, where one damned debug logging switch could cause catastrophe.
Now they have the repo, and all the vibe coded bugs from the last 3 years so they will start phishing and exploiting the web extensions or machines that are already compromised to open up the 1Password vaults locally.