GitHub secret scanning now reaches Actions logs—enable it, then close the gaps
GitHub can now find provider secrets printed in Actions workflow logs. The public preview adds useful detection, but it is off by default, does not scan old runs and sends no alert notifications.
In brief
- GitHub Secret Protection can now scan newly completed Actions workflow logs for known provider credential patterns and place findings in the normal secret-scanning alert list.
- The public preview is disabled by default, does not backfill existing logs, excludes generic, custom and AI-detected patterns, and does not send alert notifications.
- Enable it at enterprise level, assign a daily alert-review owner during the preview, and treat every finding as a credential-rotation event—not merely a log-cleanup task.
GitHub has extended secret scanning to a place where credentials often escape without ever entering source code: GitHub Actions workflow logs. When a workflow run finishes, GitHub can now scan its output for recognised provider credential patterns and add a finding to the repository's existing secret-scanning alert list.
The 9 November announcement makes the feature available as a public preview for GitHub Enterprise Cloud organisations using GitHub Secret Protection or GitHub Advanced Security. That includes enterprises using data residency on GHE.com.
This is a useful additional control, but it is not automatic protection for every Actions customer. It is disabled by default, scans only runs completed after enablement, covers a narrower set of patterns than repository scanning and does not notify teams when it finds something during the preview. Organisations should enable it deliberately and build the missing response process around it.
Why workflow logs deserve their own control
CI/CD jobs handle credentials that application source should never contain: cloud deployment identities, package registry tokens, signing credentials, test-system passwords and short-lived federation tokens. A workflow can expose one of them without committing it to the repository.
Common routes include:
- a debug command that prints an environment object;
- a tool invoked with verbose or trace logging;
- an error message that includes an authenticated URL or connection string;
- a script that transforms a secret so GitHub no longer recognises the original value for masking;
- an output or artifact reference that embeds a token;
- a third-party action that logs more context than its operator expected.
GitHub Actions tries to mask secrets in logs, but masking is a presentation safeguard, not a guarantee that no sensitive value can appear. A secret may come from outside GitHub's secrets context, be assembled during a job or be printed in a modified form. Log scanning provides a second opportunity to detect a known provider credential after the run.
What the preview actually does
After an enabled workflow run completes, GitHub scans its logs for provider patterns. A finding appears with the repository's other secret-scanning alerts and links back to the relevant workflow log. The GitHub documentation says one alert can reference multiple jobs or runs when the same credential appears more than once. It links to the workflow file and affected line without reproducing the secret inline.
For supported secret types, GitHub can also perform a validity check to help determine whether the credential remains active. Alerts remain in the system even if the underlying workflow log is deleted. That is useful for investigation and evidence, but it also reinforces an important point: deleting the log is not remediation.
The preview has five material boundaries:
- It is opt-in. An enterprise owner must enable the Actions workflow log policy under enterprise Advanced Security settings. It applies only to repositories that already have secret scanning enabled under the required licence.
- It looks forward, not backward. Only runs completed after enablement are scanned. Historical logs are not backfilled.
- It detects provider patterns only. Generic secrets, organisation-defined custom patterns and AI-detected secrets are outside the preview.
- Masked values are not detected. If Actions has already masked a secret in the log, the scanner has no original value to inspect.
- There are no alert notifications. During the preview, a new log finding does not produce the notification teams may expect from other security tooling.
Those limits do not make the feature unhelpful. They define the work needed to make it operational.
Enablement needs an owner, not just a toggle
Enterprise owners can enable the policy from Policies → Advanced Security, selecting Enabled for Secret scanning for Actions workflow logs. Before doing so, confirm which organisations and repositories have the underlying secret-scanning licence and feature enabled. Otherwise, leadership may believe the policy covers more of the estate than it does.
For the public preview, assign a named person or team to inspect the secret-scanning alert list at least daily. Because notifications are absent, a queue without an owner is effectively a silent control. If GitHub later adds notifications, review the process rather than assuming the gap has disappeared; routing, on-call expectations and response time still need to be defined.
Record three measurements from the first month:
- how many licensed repositories are actually covered;
- how long an Actions-log alert waits before triage begins;
- how long it takes to revoke or rotate a confirmed credential.
These measures expose whether the control is protecting the deployment environment or merely accumulating alerts.
Respond as if the credential was copied
Once a live credential appears in a log, assume someone or an automated service could have read it. The appropriate first action is normally revocation or rotation, not editing the workflow or deleting the run.
A practical response sequence is:
- Identify and disable the credential. Use the issuing provider, ownership metadata and validity result as aids, but do not delay revocation solely because an automated check is inconclusive.
- Preserve minimal evidence. Record the repository, workflow, job, run, affected line, time window and credential owner without copying the secret into a ticket or chat.
- Review use after exposure. Check the provider's audit trail from the earliest possible leak through revocation. Look for unusual source addresses, resources, package downloads or privilege changes.
- Replace it with narrower authority. Prefer short-lived identity federation over a stored cloud key. Limit scope, environment, audience and lifetime.
- Remove the logging path. Fix the command, action or error handler that printed the value. Test the workflow with a non-production credential and verify the output.
- Search related locations. The same script or action may run across repositories. A central workflow, composite action or copied template can turn one finding into an enterprise-wide pattern.
If the exposed credential can sign releases, publish packages or change CI configuration, also assess software supply-chain impact. A token does not need production-database access to be business-critical.
Close the coverage gaps separately
The preview will not detect a database password, private key or internal token merely because it looks sensitive to a human. Generic and custom patterns are explicitly excluded from Actions-log scanning. Do not represent this feature as comprehensive log data-loss prevention.
Use preventive controls for the gaps:
- replace long-lived cloud keys with OpenID Connect and short-lived provider credentials;
- grant workflow and job permissions explicitly, starting with read-only;
- keep production environments behind required reviewers and protected branches;
- pin third-party actions to reviewed commit SHAs and minimise the secrets they receive;
- disable shell tracing around sensitive operations;
- avoid passing secrets on command lines, where tools and process inspection may expose them;
- test reusable workflows and error paths for accidental output;
- use separate credentials per environment so one leak has a contained blast radius.
Historical logs need a risk-based review because GitHub will not scan them retroactively. Prioritise workflows that deploy production, publish packages, use persistent cloud credentials or recently ran with verbose logging. Review the credential inventory and rotate any long-lived value whose exposure history cannot be established. Downloading every old log into another system can create a new sensitive-data store, so define retention and access controls before attempting broad retrospective scanning.
What leaders should ask for
A credible implementation can be explained with a short evidence pack:
- the enterprise policy showing workflow-log scanning enabled;
- the list and percentage of repositories to which it actually applies;
- the named owner and review frequency for the silent preview queue;
- the playbook for revocation, audit review and workflow correction;
- the plan for repositories without eligible licensing;
- the migration plan from stored deployment secrets to short-lived identities;
- the date on which preview limitations will be reassessed.
The new scanner is valuable because it covers an exposure channel that source scanning cannot see. Its limits are equally important. Enable it, monitor the queue and use each finding to remove the underlying long-lived credential or unsafe logging path. Detection should shorten exposure time; prevention should make the next leak less likely and less damaging.
If you need to review CI/CD identities and secrets handling across GitHub organisations, our security consulting work can turn the alert queue into a prioritised credential-hardening plan.
Not sure whether you are exposed?
We can check your exposure, help you prioritise the fixes and review how you would spot an attack.