GitHub Scans Actions Logs for Exposed Secrets

Daily Code Guide GitHub News

GitHub has introduced a public preview that lets Secret Scanning inspect completed GitHub Actions workflow logs for provider-pattern secrets. The capability is disabled by default and is aimed at eligible GitHub Enterprise Cloud enterprises using GitHub Secret Protection or GitHub Advanced Security.

The change matters because a credential can appear in an execution log even when it was never committed to a repository. The new scanning option adds a detection point after a workflow run completes, but it does not replace careful secret handling, masking, or credential rotation.

What changed

During the preview, GitHub can scan newly completed Actions workflow logs for provider-pattern secrets. If a supported pattern is detected, GitHub adds a finding to the repository’s secret-scanning alert list and links the alert to the relevant Actions workflow log.

A single alert can identify multiple locations across workflow runs or jobs. However, the alert does not include an inline preview of the log. During the preview, workflow-log findings also do not generate notifications, so teams must check the repository’s secret-scanning alerts directly rather than relying on an alert notification.

The scanning scope is limited. The supplied feature documentation says that workflow-log scanning detects provider patterns, while generic patterns, custom patterns, AI-detected secrets, and values masked by GitHub Actions are excluded. GitHub’s broader supported-pattern catalog lists many categories, including 532 provider patterns on the supplied documentation page, but that catalog should not be treated as a confirmed coverage list for workflow logs.

Ad

Who can enable workflow-log scanning

The workflow-log feature is currently a public preview for eligible GitHub Enterprise Cloud enterprises, including enterprises with data residency on GHE.com, according to GitHub’s announcement. The enterprise must use GitHub Secret Protection or GitHub Advanced Security, and the applicable repositories must have Secret Scanning enabled.

An enterprise owner must enable the policy. The documented path is enterprise settings, then Policies, followed by Advanced Security; the workflow-log scanning setting can be enabled from the All repositories dropdown.

General Secret Scanning documentation describes broader availability for contexts such as public repositories and certain organization-owned private or internal repositories. That general eligibility information does not expand the narrower requirements for this workflow-log preview. Teams should therefore confirm that both their enterprise license and repository configuration meet the feature-specific requirements.

Scanning starts with new workflow runs

Enabling the policy does not trigger a historical review. Only workflow runs completed after workflow-log scanning is enabled are scanned. Earlier workflow logs are not backfilled.

For new runs, scanning begins after each workflow run completes. The supplied documentation does not identify a separate repository-level control for this feature; the configuration described is an enterprise policy that applies to repositories with Secret Scanning enabled under the relevant licenses.

GitHub says alerts remain available after the associated workflow logs are deleted. The supplied sources do not specify how long those alerts remain available or exactly which log-related data is retained, so teams should not assume a particular retention period.

Why log exposure still requires prompt action

A finding in a workflow log should be handled as an exposed credential. GitHub’s remediation guidance says to treat a committed secret as compromised; the same cautious response is appropriate when a credential is detected in an execution log. Verify whether the credential is still valid, update services that use it, replace or recreate the affected token, and review security logs for unauthorized activity.

For GitHub personal access tokens, the documented guidance includes deleting and recreating compromised tokens. Removing or rotating a token does not automatically close the corresponding secret-scanning alert. After remediation, the alert must be closed manually in the alert list.

The preview’s lack of notifications makes this operational detail especially important. Organizations that enable the feature should establish a process for reviewing repository secret-scanning alerts rather than assuming that a workflow-log finding will be delivered through their usual notification channels. The supplied sources do not document broader webhook or event behavior for these preview findings.

How to avoid printing secrets in Actions logs

Detection is a fallback, not a safe logging strategy. Avoid printing secret values from workflow steps, scripts, diagnostics, or error output. GitHub’s Actions secret-handling guidance recommends using ::add-mask:: for sensitive information that is not already stored as a GitHub secret.

Where supported, OpenID Connect can reduce the need to store some long-lived cloud credentials as secrets. GitHub also warns that values handled through its documented large-secret encryption workaround are not redacted when printed in workflow logs. Print statements containing those values should be removed.

Masking remains important, but it also affects what this preview can detect: values masked by GitHub Actions are excluded from workflow-log scanning according to the feature documentation. Teams should not interpret the preview as coverage of every credential that might appear during a run.

What you should do

  1. Check eligibility. Confirm that the enterprise is on GitHub Enterprise Cloud with GitHub Secret Protection or GitHub Advanced Security and that the relevant repositories have Secret Scanning enabled.
  2. Enable the enterprise policy if appropriate. An enterprise owner can open enterprise settings, choose Policies, select Advanced Security, and enable the workflow-log setting for all repositories.
  3. Review alerts directly. Because preview findings do not generate notifications, monitor each applicable repository’s secret-scanning alert list.
  4. Investigate every exposure. Follow the alert link to the relevant workflow log and determine which credential, workflow, job, or run was involved.
  5. Rotate or replace the credential. Treat the exposed value as compromised, update dependent services, and inspect security logs for unauthorized activity.
  6. Close the alert manually. Removing or replacing the credential alone does not automatically close the alert.
  7. Reduce future exposure. Remove secret-printing statements, mask sensitive non-secret values, and consider OpenID Connect for supported cloud authentication scenarios.

Preview limitations to keep in mind

This is a public preview and may change. It scans only completed workflow runs produced after enablement, and its detection scope is limited to provider patterns. Generic, custom, AI-detected, and GitHub Actions-masked values are excluded under the documented preview behavior.

GitHub has not provided a general-availability date or feature-specific pricing details in the supplied sources. The documentation also does not confirm whether every provider pattern in the general catalog is supported by workflow-log scanning. Teams should treat the feature as an additional detection layer, not as a complete audit of workflow output.

Sources

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Ad
Ad
Ad