TRUFFLEHOG

COMPANY

RESOURCES

Brittany Bodane

Finding Your Secrets Beyond the Sources You Control

Finding Your Secrets Beyond the Sources You Control

Brittany Bodane

When a secret ends up somewhere public, the quiet assumption is that it will sit there unnoticed until someone gets around to finding it. Researchers at Stony Brook tested that assumption. They put working cloud keys inside container images, pushed them to public registries, and waited. The first key was used 7.86 seconds after the image went live on Docker Hub.

Every secrets program starts with the sources you control: your repositories, your CI, your cloud accounts, your SaaS tools. That’s the part of the problem you can inventory, and it’s where most of the effort goes. The secrets that end up costing you are usually sitting somewhere you never had the chance to connect.

You can only connect what you know about

Connected-source scanning works from an inventory. You point a scanner at your repositories, your pipelines, your cloud accounts and your SaaS tools, and it watches them. Anything it finds, it finds because someone identified that source as yours and wired it up.

That model holds right up to the edges, and the edges are where secrets go. A developer pushes to a personal GitHub account over the weekend. A contractor publishes a container image under their own namespace. A partner’s engineer leaves a key in a public Postman workspace that nobody at your company could point you to. In each case the secret still works, it still opens your systems, and the place it ended up appears on no inventory you maintain.

Where one company's secrets end up

Your repos, CI, cloud and SaaS

Sources someone identified as yours and wired up to a scanner.

Watched

A personal GitHub account

A developer pushes from home over the weekend.

Not on your list

A contractor's container image

Published under the contractor's own namespace.

Not on your list

A partner's Postman workspace

Public, and nobody at your company knows it exists.

Not on your list

The secret opens your systems from all four places.

Only the first one is on an inventory you maintain.

That gap is what public monitoring covers: scanning the public internet for secrets that belong to you, whoever published them and wherever they landed. It answers a different question than connected-source scanning does. Instead of what is in my sources, it asks what is already out there that I didn’t put there.

Public sources go well beyond repositories

Public scanning has historically meant public repositories, which made sense when code was where secrets leaked. Secrets travel a good deal further than that now.

They turn up in package registries, CI artifacts, public storage buckets, mobile app bundles, browser extensions and AI training datasets. Scanning those is a different kind of problem than scanning repositories, and the reason is unglamorous: volume. Pulling all of that, unpacking it and testing what comes out is an infrastructure problem before it’s a detection problem, which is why coverage of it is rare.

It’s also where some of the most interesting findings are. CI artifacts exist to be downloaded and rarely get treated as public documents, even though that’s what they are.

It’s also where the bulk of our own scanning goes: npm, PyPI, GitHub, GitLab and its CI artifacts, Hugging Face datasets, Android apps and Firefox add-ons, which came to more than 20 petabytes this year.

Toradex, a Swiss manufacturer whose embedded systems run in medical, defense and industrial devices, had a Docker Hub organization token written into a public GitLab CI artifact. The token could push to the flagship image their devices pull at install time, so anyone holding it could have changed what those devices installed. Their repositories were clean. After we reported it, Toradex rotated the token, fixed the CI configuration that was writing it out, and confirmed from audit logs that nobody else had used it.

Toradex: clean repos, exposed build output

Public CI artifact

A GitLab build output that anyone could download.

contained

Docker Hub org token

Written into the artifact by the CI configuration.

could push to

The flagship image

The image their devices pull at install time.

Their repositories were clean.

The exposure was in what the build published.

A secret nobody can trace is a secret nobody revokes

Scanning the public internet turns up an enormous number of live secrets belonging to everyone in the world. Turning that into something a particular security team can act on is the actual work, and it comes down to two things.

The first is attribution. A finding needs to carry the reason the secret is attributed to your company in the first place. Sometimes that reason is the committer’s email domain. Often it isn’t, since the person who leaked a key is frequently not an employee, or is working from a personal account under a personal address. The stronger signal tends to come from the secret itself: what it authenticates to, what it reaches, whose infrastructure sits behind it.

The second is attribution of a different kind: who can actually revoke it. Knowing the secret is yours doesn’t tell you that, and the two are different people more often than not. That gap is where remediation stalls, so both the person who leaked it and the person who owns it need to surface. One of them gets notified, and the other gets asked what broke.

Scanning every public dataset on Hugging Face turned up 787 live Hugging Face tokens, 237 of them with write access and 70 with org-admin, alongside 318 Docker Hub tokens that could push images. Most of those secrets leaked somewhere else first, in a repository or a web page or a chat log, and were swept into training data later. The person who uploaded the dataset is almost never the person who can revoke the key.

Access decides what gets fixed first

A live key might be a read-only token for a public dataset, a deliberately published identifier, a test secret in an empty sandbox, or a production admin key. All four pass a liveness check, and only one of them should wake anyone up.

Four live secrets, one emergency

Read-only dataset token

Reads a dataset that is already public.

Can wait

Published identifier

Meant to be public. Grants nothing on its own.

Can wait

Test secret

Opens a sandbox with nothing in it.

Can wait

Production admin key

Reaches production, and every role it can assume.

Act now

All four pass a liveness check.

Access is what separates them.

What separates them is access: what the secret reaches, what it can do once it’s there, and how much further that likely extends through roles it can assume. A finding that arrives with its permissions and blast radius attached can be triaged in a minute. Without that context the same finding turns into an investigation, and investigations are what backlogs are made of.

During OpenAI’s July cyber evaluation, agents found 14 working Hugging Face tokens with write access sitting in a public dataset. Less than a day later, Hugging Face production credentials were on the agents’ message board. What made those tokens worth dropping everything for wasn’t that they authenticated. It was write access, and what that access reached next.

Where the next incident comes from

The sources you can connect are the sources you already know about. The secret that hurts you is usually the one published somewhere nobody thought to look.

Public monitoring is how you find it. In TruffleHog Enterprise those findings land in the same place as everything else: tagged as public leaks, carrying the context that explains why we believe the secret is yours, then routed to an owner, tracked through remediation and retested to confirm the key is dead.

The Dig · Truffle Security Co.

Ready to talk to the team?

See how TruffleHog Enterprise finds your secrets in public sources, shows why each one is yours, and routes it to the owner who can revoke it.

infra