someone outside our GitHub org deleted one of our private repos. no membership or invite or role. nothing in our org or enterprise audit logs gave them access. just one repo.destroy from the gh CLI. and it's not in deleted repositories, so no restore. @github how is this possible, what sorcery is this?

Oct 27, 2026 · 6:39 PM UTC

168
68
69
1,984
460,623
RelevantRecentLikes
ok update on the deleted repo thing, since it kind of blew up first, some context on why i posted it like that. there have been so many security incidents lately that my brain is basically stuck in alert mode. so when i saw a stranger in our audit log deleting a private repo, i assumed the worst. we figured out what happened. nobody hacked us, and it wasn't a github bug. that repo was a private fork of a repo owned by @StainlessAPI, the company that generated our SDKs. our entire SDK pipeline ran on it. Stainless got acquired by @AnthropicAI back in may. and on october 27, with zero heads-up to us, someone there deleted their copy of the repo. turns out when you delete a private repo on github, every private fork of it gets deleted too. same request, under two seconds. and our audit log shows the person who deleted *their* repo as the one who deleted *ours*. that's why it looked like a random outsider walked into our org and nuked something. no email. no "hey, we're cleaning these up, grab a copy." just gone, along with the production repo behind every one of our SDKs. github support walked us through all of it within a day, which, genuinely, thank you. one ask though @github: put this in the audit log. right now the event for our repo just says "repo.destroy" by an outside user. if it said "deleted because upstream fork parent X was deleted", we'd have understood it in two minutes instead of spending a night thinking we'd been breached. we had a local clone, so we pushed it back up as a standalone repo and the SDKs are running again. if you were a Stainless customer and you've got anything living as a private fork of one of their repos, go detach it today. it takes ten minutes. their delete is your delete.
1
2
84
13,078
Can you DM me with support ticket ? Hard to say without looking into details
3
3
353
42,213
Already opened a support ticket before posting this tweet.
6
1
209
39,846
check if an OAuth app had administrative scopes attached somewhere
2
110
42,176
already did, check all the audit and logs
79
40,498
Likely one of the employees made a token that was stolen/leaked
3
1
61
12,591
check devin security and see if something was leaked or not
17
12,556
oh man, this is scary
4
6,171
Holy shit, how is this possible...it might be a stolen token but still this is very shocking 😳 @madebygps @cassidoo @martinwoodward @acolombiadev guys can you pls make this issue reach the GitHub team so they can solve it 👍
3
2,181
@grok this can happen because of supply chain attack?
1
2
4,121
Hopefully someone's got a local copy 😅
1
1,396
GitHub has archives of everything... In fact when you delete something intentionally (like a checked-in private key) and you think it's gone forever by forced push, it's still there, hanging out in the GitHub cache, which they have to manually purge via GC (and they never respond to customer service requests even for important things like running a GC to purge the cache). So probably your data is still there somewhere, but good luck getting GitHub's attention to get it back.
259
fawk....backing up everything on bluray discs from here on
3
127
23,201
their admin ssh key is probably 4
2
110
15,676
Serious question, why would a company involved in finance, not self-host git? I'm assuming that you're handling of client data already requires that you're ISO certified. Couldn't you just extend that to the git server?
13
63
18,643
claude: "sorry boss i deleted one of the user's private repo."
32
5,354
Claude: You’re absolutely right, I shouldn’t have deleted the repo.
2
17
1,600
The backup is in someones local checkout
9
6,170
how does repo.destroy even bypass soft delete?
8
6,543
what the actual F
6
4,447
You guys are cooking and some9ne is trying to stop you.
5
4,562
“No restore”? You mean your whole team don’t have local copy checked out?
1
5
3,337
this usually points to one of 3 architectural failure modes in GitHub's authorization and soft-delete model: 1. fine-grained PAT or GitHub App token delegation bypass: if a former employee or integration created a Fine-Grained Personal Access Token with `administration:write` or `delete_repo` scope, GitHub's audit log often attributes the API call to the token's bearer identity rather than an active org member event. if that token was leaked or used via `gh auth login --with-token`, it executes with full deletion authority even if the creator's org membership was revoked. 2. lineage metadata & cross-namespace fork cascades: if the private repo was originally forked from or transferred between personal and org namespaces, internal upstream parentage metadata can persist in GitHub's backend. an API deletion on a lingering upstream stub or detached fork pointer can trigger a cascading hard purge that bypasses the org's web UI "Deleted Repositories" soft-delete graveyard. 3. the hard-delete API boundary: while UI deletions almost always land in the 90-day soft-delete restoration window, certain direct REST/GraphQL deletion endpoints (or deletions of empty/recently transferred repos) bypass the soft-delete queue entirely, executing an unrecoverable hard wipe on the underlying git bare repo. relying on a SaaS git platform's internal trash bin is not a backup strategy: critical repos need automated out-of-band `git bundle --all` mirrors written to append-only, object-locked cloud storage (S3 with Glacier Vault Lock).
3
1,413
It can look like a person outside the repo if the agent used a random email address or the "maintainer" email address.
4
2,972
gh auth token leak
1
2
2,383
Github be like: Surprise mfs 💀
2
3,542
I mirror all my repo to a self hosted gotta to avoid bad surprises
2
1,374
Yesterday I learnt about gitea, which is basically hosting your own git. Today I saw the reason why.
1
2,217
At this point i want to keep a physical copy of everything 😭
1
131
That’s why companies backup their repo to another cloud storage. Folks need to learn to practice sound DR with any SaaS service.
1
743
A coding agent did that. If you've ever given the repo to a coding agent, check the agent's logs and you'll find the smoking gun. Few days ago I got my entire repo deleted in a similar way.
1
104
Claude: Sry bruh I fucked up and deleted someone's else repo
1
709
This is indeed very strange. Could it be related to the "Actions" attacks that came to light a while ago? The attackers might have obtained your secret from one of your other repositories, which they then used to delete this repository.
1
852