r/devops • • Jul 27 '26

Security How GitHub gave every one of their 14,000+ repos a validated owner in 45 days

This is a summary of their blog post on how they assigned owners to over 14,000 internal repos when as of early 2025, less than half had a clear owner. It became a problem during a secret-scanning remediation push. they could rotate a leaked secret, but without knowing who owned the repo, doing so was risky and there was no way to route the work.

Their old model only tracked ownership for repos backing a deployed service, through an internal Service Catalog. That covered maybe a third of repos. Everything else, team repos, docs, internal tools, one-off projects, personal experiments, had no owner on record. Finding one meant checking commit history, reading the README, or asking around in Slack.

What they built:

Two GitHub custom properties: ownership-type (Service Catalog / Team / Individual) and ownership-name (free text, validated against actual org membership, team existence, or Service Catalog entries).

Before asking a single person to do anything, they synced ownership from the existing Service Catalog, which auto-covered about 1,500 repos.

For the rest, they ran a GitHub App on a Kubernetes CronJob that opened an issue on unowned repos with a 30-day deadline, then archived anything still unclaimed. They picked archiving because it's reversible, repo goes read-only, Actions stops, nothing gets deleted.

Two incidents:

  1. They archived a repo that had a Datadog integration configured to open issues in it. Datadog couldn't create the issue post-archive, and nobody had been directly notified about the pending archival, their own monitoring paged the owning team before the ownership system did. Fix: they started @-mentioning repo admins directly and assigning all write-access users as a fallback.
  2. They realized a stale or corrupted response from Service Catalog could trigger mass-archiving of repos that actually had valid owners. So they added a threshold check. If a single run is about to archive or flag more repos than some conservative limit, it aborts and pages instead of running.

End state: ~3,000 active repos, ~11,000 archived (up from ~3,000 archived at the start), done in under 45 days. They also tightened the ongoing enforcement loop from a 30-day grace period down to one hour, and made ownership required at repo creation going forward.

87 Upvotes

20 comments sorted by

53

u/chrismakingbread Jul 27 '26

If only there was some kind of mechanism to track the history of who had created and contributed to these repositories with timestamps.

11

u/dannyt74 Jul 27 '26

😃 The biggest issue was fluctuation. Ownership can also be different than contribution. Tracking the team who owns some code is much more reliable.

5

u/chrismakingbread Jul 27 '26

Maybe this is covered in original post and just not your summary, but my point is there’s no mention here of actually leveraging any of that metadata and instead just going IDK just fail closed and start auto archiving repos and see what breaks. The whole thing seems like a ham fisted solution to a relatively non problem. Like some middle manager said wow, 14,000 repos sounds like a big number, I’m gonna make it my pet project to take credit for cleaning that up.

55

u/foramperandi Jul 27 '26

That doesn't help much when those people no longer work at the company.

7

u/chrismakingbread Jul 27 '26

But did they even use that data? I’m not even convinced of what actual problem was being solved here. Like having load bearing services with no clear owner is an issue, having unmaintained deployed code with security vulnerabilities is an issue, but it sounds like that part of it was generally solved already. This post basically goes somebody decided 14k repos sounds like a lot, I’m going to decorate my resume by being able to say I reduced repos at GitHub from 14k to 3k and enforced identified ownership across all repositories. Not necessarily a bad thing but approaching it by going IDK just auto archive and see what breaks doesn’t feel like the risk equaled the reward for how it was approached.

2

u/danekan Jul 27 '26

Even when they are at the company this process is broken in GitHub unless you’re on enterprise 

6

u/rahulladumor Jul 27 '26

The Individual option in ownership-type is the bit I would worry about. Validation against org membership stays green right up until that person offboards, and then the repo is owned by nobody again without anything failing. Does the post say what happens to those when the account goes?

5

u/dannyt74 Jul 27 '26

They try to assign ownership to teams. Which makes much more sense. They require a team to have at least to members and it should be easier to track when it goes away or gets merged into another team.

5

u/danekan Jul 27 '26

Point 2 is so basic that it’s scary they had to point out that they did it … they don’t have error handling or exiting in their workflows for bad api responses as the norm?  Is this why gha goes down 3x a week?

1

u/dannyt74 Jul 27 '26

Maybe, like in many bigger organisations, there was not much incentive to fix tech debt.

5

u/danekan Jul 27 '26

This is all written like they wrote a new service to do this archive and they didn’t do that most basic check in that new vibe coded coded they made 

5

u/DevOpsOpsDev Jul 27 '26

Archiving a repo doesn't mean the artifacts deployed by said repo were ever cleaned up so it doesn't really solve the problem of secrets rotation

3

u/dannyt74 Jul 27 '26

When you know it can be archived and nothing breaks after doing so, they should be pretty sure that they can rotate the secret.

9

u/marcusbell95 Jul 27 '26

threshold check is the part worth stealing. any bulk automation should have a "this is way more repos than expected, abort and page" circuit breaker - more likely you hit a bad input or a bug than that scope legitimately 3x'd overnight. the datadog thing is also a good lesson: archiving is reversible from a human POV but integrations have no concept of "temporary" - if the issue couldn't be created when it needed to be, that monitoring gap happened regardless of whether you unarchive later.

2

u/[deleted] Jul 28 '26

[removed] — view removed comment

1

u/dannyt74 Jul 28 '26

Indeed. That’s why ownership by teams with a minimum of two members is important here.

The lifecycle approach is crucial as you said. Software is also a data consumer and producer, there are shifting regulations, requirements and most important, security issues to follow up with.