Latest / Decrypted: The UK Cyber Briefing / Half a million working keys sit in public code, and some have been there since 2009
Transcript
- 0:03This is Decrypted. Sunday, the fourth of October.
- 0:06Half a million working keys sit in public code, and some have been there since 2009.
- 0:13A security firm has found more than half a million working passwords, keys and tokens sitting in public code
- 0:20repositories. The most uncomfortable number isn't the total.
- 0:24It's the age. Truffle Security scanned 224 million public GitHub repositories and found 543,699 unique creden
- 0:36tials that still authenticated in July 2026.
- 0:40The median one had been exposed for 784 days.
- 0:44The oldest dated from 2009, and it still worked.
- 0:48Next.
- 0:52They used The Stack v3, a dataset assembled for training large language models.
- 0:58Truffle matched known credential patterns, then tested each hit against the issuing provider on 27 and 28 Jul
- 1:07y 2026. A credential only counted if the provider confirmed it was live.
- 1:13Those 543,699 secrets appeared 1,103,438 times, because the same secret often gets copied around.
- 1:26Think of a hotel that never recodes its room locks.
- 1:30Guests leave, keys go missing, and nobody knows which doors they still open.
- 1:34Committing a secret to a public repository is like leaving a key in a car park.
- 1:40Deleting the file afterwards changes little.
- 1:42The history keeps a copy, and the lock is still the same lock.
- 1:46And also.
- 1:51The survival rates are the real lesson.
- 1:54Truffle reported that almost no npm tokens, just 0.
- 1:58001%, and few GitHub tokens, 0.
- 2:0336%, still worked. That's because those providers run revocation programmes.
- 2:09By contrast, 54% of Google Cloud service account credentials and 88% of Postgres connection strings were stil
- 2:18l live. Nobody was watching for those, and nothing expired them.
- 2:22GitHub made push protection the default from 29 February 2024.
- 2:28It blocks known secret formats at the moment of commit.
- 2:32Truffle estimates it cut leakage in covered categories by about 53%.
- 2:37But 51.8% of the live credentials were in a shape that a default public repository will still accept.
- 2:44And the feature can't reach commits made before it existed.
- 2:48And also.
- 2:51For years, the burden has sat on the individual developer, who is asked never to make a mistake.
- 2:58A secure by design platform assumes the mistake will happen, and limits what it costs.
- 3:04Three decisions would have helped.
- 3:06First, issue short-lived credentials by default, so a leaked key is dead within hours rather than after 784
- 3:15days.
- 3:23t all.
- 3:31tokens.
- 3:34Some plumbing, and losing one key that works forever.
- 3:37And finally.
- 3:41This is opinion, not advice.
- 3:44Treat anything ever committed to a public repository as compromised.
- 3:48Rotate it. And scan the history, not only new commits, because Truffle is explicit that earlier commits fall
- 3:56outside push protection. Ask the agencies and suppliers who write code for you whether their secrets expire.
- 4:03Where a cloud provider offers short-lived tokens, write them into procurement requirements, rather than treat
- 4:09ing them as an optional extra.
- 4:11The training-data angle matters too.
- 4:14A key copied into a dataset built for AI models is a copy nobody can recall.
- 4:19And if personal data sits behind a leaked database connection string, that's a data protection problem as wel
- 4:26l as a security one.
- 4:29The written version and every source are linked in the show notes.
- 4:33Thanks for listening.