The attacker was trying to compromise agentkit and found changed-files used in the repo so looked around. Found that it was using a bot with a PAT to release.
Totally possible the bot account had a weak password, and the maintainer said it didn't have 2FA.
They got the release bot PAT so they tried possibly quite an obvious vector that. They didn't need anything sophisticated or to exfil the credentials because agentkit is public.
It just so happened that it was detected before agentkit updated dependencies.
It's possible that with if thye had checked the dependabot config they could've timed it a bit better so that it's picked up in agentkit before being detected.
edit: Although, I don't think PATs are visible after they're generated?
You just set two remotes locally, create a tag and push just the tag to upstream. You can definitely do it locally, and I think GitHub doesn’t prevent such pushes either.
My goto was basically: "I want to do <x>. What do you think?" (but a bit more diplomatically phrased)
Some examples:
- Change the way standups are done
- Do something not directly related to the team
- Do debt
- Change / take over the way a project is being done
In general it worked well because either I had a good idea in which case I'd often get the agency to do it, or perhaps not directly but a path towards it or it wasn't and I learnt something.