GitHub now scans Actions logs for leaked secrets. Search the old ones yourself first
Since November 9, GitHub can flag a cloud key or API token printed in a workflow log. It's off by default, it only looks at runs that finish after you switch it on, and it skips several kinds of secret. The logs you already have are still your problem.

On November 9, 2026, GitHub put secret scanning for GitHub Actions workflow logs into public preview for Enterprise Cloud customers with Secret Protection or Advanced Security. Enterprise owners must enable it; it scans only runs that complete afterward, detects provider patterns only, skips custom, generic, AI-detected and already-masked secrets, and sends no notifications during the preview. Turn it on, then search your existing logs yourself and rotate anything you find before deleting the log.
What GitHub switched on, and what it didn't
On November 9, GitHub added Actions workflow logs to the places its secret scanning looks. When a workflow run finishes, GitHub checks the log for known provider patterns: cloud keys, payment tokens, the formats it already recognizes in code. A match shows up in the repository's secret scanning alerts, with a link to the log, and where GitHub supports it, a check on whether the secret is still valid. The alert stays even if someone deletes the log.
That's a useful addition. Build logs are one of the most common places a secret ends up in plain text, and one of the least watched. Code gets reviewed. Logs mostly get skimmed when something fails, by whoever is on call, and then forgotten.
The validity check is worth noticing too. An alert that says the key still works is a very different morning from one that says it was revoked months ago, and it helps a small team decide what to handle first.
The fine print matters, though. It's a public preview. It's available only to GitHub Enterprise Cloud customers with Secret Protection or GitHub Advanced Security. It's off by default, and an enterprise owner has to enable it in the enterprise's Advanced Security policies. It scans only runs that complete after it's switched on. And it skips several kinds of secret, which we'll come to.
How secrets end up in logs
Actions masks the secrets you register with it, replacing them with asterisks in the output. Leaks happen around the edges of that. A few patterns show up again and again:
- Debug output. Someone turns on verbose mode in a shell script or a CLI tool to chase a failing deploy, and the tool prints its full configuration, including tokens.
- Values that aren't registered secrets. A key fetched from a vault at runtime, a token returned by one step and passed to the next, or a connection string built from parts. Masking only knows about values it was told about.
- Transformed copies. A secret that's base64-encoded, URL-encoded or embedded in a larger JSON blob may not match the masked string.
- Error messages. A failed database connection or HTTP call that echoes the URL, credentials included.
- Third-party steps. An action from the marketplace that logs its inputs for troubleshooting will happily print whatever you passed it.
None of this needs carelessness. It needs one late-night fix to a pipeline nobody has looked at since.
Deleting the log hides the evidence. It doesn't take the key back.
What the preview won't catch
GitHub lists the exclusions plainly. Generic patterns, such as passwords, aren't detected. Custom patterns your organization defined aren't detected. Secrets found by AI-based detection elsewhere in GitHub aren't detected in logs. Secrets that Actions already masked are skipped, which makes sense, since they aren't visible.
There's no backfill, so every log from before you enable it is unscanned. And there are no notifications during the preview. Alerts appear in the list, and somebody has to go and look.
Put together, the scanner covers the most recognizable, most dangerous class of leak going forward. It leaves the history, and the internal credentials that don't look like a cloud provider's, to you. Many of the secrets that matter most in a business application, such as your own service tokens, an admin password or a webhook signing key, fall into exactly that gap.
Decision guide
What the preview flags, and what stays with you
| Consideration | GitHub's log scanner (preview) | Still yours to catch |
|---|---|---|
| Which runs | Runs that complete after an enterprise owner enables it | Every log already stored from earlier runs |
| Which secrets | Supported provider patterns, with validity checks where available | Custom patterns, generic passwords, AI-detected secrets |
| Masked values | Not scanned, because Actions already hid them | Encoded, split or transformed copies that masking missed |
| Telling people | Alerts in the repo's secret scanning list, no notifications yet | Someone who checks that list and owns the rotation |
Search the logs you already have
Before the scanner starts flagging new runs, spend an afternoon on the old ones. You don't need special tooling.
- List the repositories with workflows that touch production: deploys, migrations, release builds, anything that calls a paid API.
- Download recent logs for those workflows. The GitHub CLI can print a run's full log with
gh run view <run-id> --log, and a small script can loop over runs fromgh run list. - Search for the obvious first: the prefixes your providers use for keys, words like
password=,token,secret,Authorization:and://user:in URLs. Then search for your own internal service names next to anything that looks like a long random string. - Note where each hit came from. The step that printed it is what you'll fix.
- Keep the list somewhere private. A spreadsheet of found secrets is itself sensitive. Record the repository, run and step, not the value.
How far back to go depends on how long your organization keeps logs. If retention is long, start with the last few months of production deploys and widen from there. Don't forget forks and archived repositories that still hold old runs, or workflows that were renamed and now look unfamiliar.
When something turns up
Rotate first. Deleting the log hides the evidence. It doesn't take the key back. Anyone who could read that log, including people with read access to the repository and anything that copied the output, may already have it. Issue a new credential, revoke the old one at the provider, and check the provider's access logs for use you can't explain.
Then fix the step that printed it, so the next run doesn't repeat the leak. Only then delete the log, and close the alert with a short note of what happened. If rotation is the part you dread, our note on running a secret rotation cutover lays out who does what and in which order. The same thinking applies to keys that leak through AI coding tools, which we covered in Claude Code's local settings file.
Longer term, the best fix is a secret that isn't worth stealing. Where your cloud provider supports it, let workflows request short-lived credentials through OpenID Connect instead of storing long-lived keys, and scope each credential to the one job that needs it. A leaked token that expires in an hour and can only push to one bucket is an incident report, not a crisis.
Finally, if you're on Enterprise Cloud with the right license, ask your enterprise owner to switch the preview on and name a person who checks the alert list each week until notifications arrive.
We help teams tidy up build pipelines and release processes for the applications they run. See our web application development work or talk to us.
Related work: Sutton|Place
How the work moves
From a key in a log to a closed alert
- Rotate
Issue a new credential and revoke the leaked one at the provider.
- Check use
Look at the provider's access logs for calls you can't explain.
- Fix the step
Change the workflow so the value can't print again.
- Then delete
Remove the log and close the alert with a note of what was done.
We build alongside the people doing the work.
Bring us the problem you’re thinking about.