GitHub Actions build log with a leaked iOS signing key highlighted

 

Short answer

GitHub's secret scanning can now read Actions workflow logs, but the November 9 preview is limited to GitHub Enterprise Cloud with Secret Protection or Advanced Security, is off by default, and skips old logs, custom patterns and values Actions already masked. A match passphrase or a keychain password has no shape it can recognize. On any plan you can download your recent run logs with the GitHub CLI, scan them with the script below, rotate anything real before you delete the logs, and change the workflow so a key is never echoed or decoded into a second variable.

GitHub's secret scanning can now read the logs your GitHub Actions workflows print. The feature arrived as a public preview on November 9, 2026, and for iOS teams it lands on a sore spot. A typical TestFlight pipeline handles an App Store Connect API key, a match passphrase, a Git token for the certificates repo, maybe a base64 copy of a .p12 and its password. Every one of those can end up in a log line if one step echoes the wrong variable.

The catch is who gets the feature. The preview is limited to GitHub Enterprise Cloud enterprises that pay for GitHub Secret Protection or GitHub Advanced Security, it is off by default, and it only looks at runs that finish after an enterprise owner turns it on. A solo founder who built an app with Cursor or Claude Code and shipped it through a free GitHub account will not see a single alert from it.

This post covers what the preview does and what it skips, then walks through checking your own iOS build logs today with a small script, cleaning up when you find something, and changing the workflow so the next run doesn't print the key again.

What GitHub announced

According to GitHub's changelog entry, secret scanning now checks Actions workflow logs alongside the places it already covered, such as issues, pull requests, discussions and wikis. The scan runs after a workflow run completes. Anything it finds shows up in the repository's secret scanning alert list with a link back to the log, validity checks run for the secret types that support them, and the alert stays even after the log itself is deleted.

The limits matter more than the headline:

  • It is a public preview for GitHub Enterprise Cloud with GitHub Secret Protection or GitHub Advanced Security, including GHE.com data residency.
  • An enterprise owner has to enable it under the enterprise's Advanced Security policies ("Secret scanning for Actions workflow logs"). It is disabled by default and only applies to repositories that already have secret scanning on.
  • Old logs are not scanned. Only runs that complete after the setting is on.
  • Generic patterns, custom patterns, AI-detected secrets and values Actions already masked are not detected. It looks for provider patterns.
  • During the preview, alerts do not send notifications. Somebody has to open the alert list and look.

That fourth point is the one iOS developers should think about. Provider patterns are tokens with a recognizable shape, the kind listed on GitHub's supported patterns page. A match passphrase is just a string you made up. A keychain password is a string you made up. Neither has a prefix a scanner can recognize, and custom patterns are excluded from this preview, so a leaked MATCH_PASSWORD is the sort of thing it was never going to catch. If your build prints an App Store Connect private key, check the patterns list for coverage before you count on an alert.

How secrets get into an iOS build log

GitHub Actions already masks the values of repository secrets when they appear in logs. Most leaks happen around that protection, and GitHub's own security guidance spells out the usual routes.

The first route is transformation. Masking works by matching the exact secret value. If a step base64-encodes it, decodes it, splits it or wraps it in JSON, the printed text no longer matches and goes out in the clear. GitHub's guidance says registering secrets "applies to any sort of transformation/encoding as well", and it warns that structured data can make redaction fail, so each sensitive value should be its own secret. That hits iOS pipelines directly, because people often store a .p8 or .p12 as base64 and decode it inside the job. fastlane's app_store_connect_api_key action even has an is_key_content_base64 option for this.

The second is derived values. A step generates something sensitive, such as a temporary keychain password or a token fetched from another service, and prints it or exports it before anyone tells the runner to hide it. Actions has a command for that, ::add-mask::, and the workflow commands reference warns you to register the value with add-mask before it is output in the logs.

The third is debugging. Someone adds set -x to a shell step to see why signing fails, and bash now prints every command with its expanded variables. Someone runs env or printenv to check a path. Someone turns on fastlane match --verbose, which the match docs describe as printing extra information and all commands. These changes get committed during a late-night signing fight and stay in the workflow for months.

The fourth is the one AI coding tools add. When an agent writes your workflow, it tends to add diagnostic echo lines so it can read the output on the next attempt. A line like echo "Key: $ASC_KEY_CONTENT" is harmless while the variable is a masked secret, and leaks the moment a later step decodes it into a new variable.

Who can read those logs

Before deciding how worried to be, look at who can open the logs. For a public repository, any signed-in GitHub user can view workflow run logs; the workflow run logs docs only require that you are logged in. The REST endpoint to download a run's logs also works without authentication for public resources. For a private repository, anyone with read access can download the log archive.

Logs are also kept for a while. The default retention for artifacts and logs is 90 days. Public repositories can set 1 to 90 days, private ones 1 to 400 days, according to GitHub's retention settings page. Since October 1, 2026, that retention setting also covers checks, workflow runs and statuses, which used to be kept for more than 400 days regardless of the setting (changelog). So a key printed in September is probably still sitting in a log you can download today.

Step 1: download your recent logs

You can scan your own logs on any plan. Start by pulling down the log archives for recent runs. In the web interface, open the repository's Actions tab, pick the workflow, open a run, open a job, and choose Download log archive from the menu at the top right of the log. That gets tedious past a few runs, so use the GitHub CLI instead.

The REST API has an endpoint for this, GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs, which answers with a redirect to a zip file (the redirect URL expires after a minute, per the workflow runs API docs). This loop fetches the last 30 completed runs of a repository:

#!/usr/bin/env bash
# fetch_ci_logs.sh [owner/repo]
# Downloads the log archives of the last 30 completed workflow runs into ./ci-logs
set -euo pipefail
REPO="${1:-$(gh repo view --json nameWithOwner -q .nameWithOwner)}"
mkdir -p ci-logs
gh run list -R "$REPO" --status completed --limit 30 \
  --json databaseId -q '.[].databaseId' |
while read -r id; do
  gh api "repos/$REPO/actions/runs/$id/logs" > "ci-logs/run_$id.zip" \
    || echo "could not download run $id"
done
ls -lh ci-logs

Run it from inside a clone of the repository, or pass owner/repo as the first argument. It needs gh signed in with read access to Actions on that repository. If a zip comes back tiny, it is probably an error page rather than a log, and the scanner in the next step will tell you so.

Step 2: scan the archives for iOS secrets

Here is a short Python script that reads the zip archives (or folders of extracted .txt logs) and reports lines that look like the secrets an iOS release pipeline handles. It uses only the standard library, so it runs on the Mac you build on or on any Linux box.

#!/usr/bin/env python3
"""Scan downloaded GitHub Actions log archives (or folders) for iOS build secrets.

Usage: python3 scan_ci_logs.py logs.zip [more.zip or folders ...]
Prints file, line number and the rule that matched. Values are cut short.
"""
import re, sys, zipfile, pathlib

RULES = [
    ("PEM private key (.p8 / .p12 export / deploy key)",
     re.compile(r"-----BEGIN (?:EC |RSA |ENCRYPTED |OPENSSH )?PRIVATE KEY-----")),
    ("Base64 of a PEM block (key_content with is_key_content_base64)",
     re.compile(r"LS0tLS1CRUdJTi[A-Za-z0-9+/=]{20,}")),
    ("Match / keychain / p12 password assignment",
     re.compile(r"(?i)\b(MATCH_PASSWORD|MATCH_KEYCHAIN_PASSWORD|KEYCHAIN_PASSWORD|P12_PASSWORD|CERTIFICATE_PASSWORD)\s*[=:]\s*(?!\*\*\*)\S+")),
    ("Basic auth for the match repo",
     re.compile(r"(?i)\bMATCH_GIT_BASIC_AUTHORIZATION\s*[=:]\s*(?!\*\*\*)[A-Za-z0-9+/=]{12,}")),
    ("Apple ID session or app-specific password variable",
     re.compile(r"(?i)\b(FASTLANE_SESSION|FASTLANE_PASSWORD|FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD)\s*[=:]\s*(?!\*\*\*)\S+")),
    ("GitHub token", re.compile(r"\b(ghp|gho|ghs|ghu)_[A-Za-z0-9]{36}\b|\bgithub_pat_[A-Za-z0-9_]{40,}")),
    ("Google API key (Firebase config)", re.compile(r"\bAIza[0-9A-Za-z_\-]{35}\b")),
    ("Anthropic API key", re.compile(r"\bsk-ant-[A-Za-z0-9_\-]{20,}")),
    ("OpenAI-style API key", re.compile(r"\bsk-(?:proj-)?[A-Za-z0-9_\-]{32,}")),
    ("Slack token", re.compile(r"\bxox[abprs]-[A-Za-z0-9\-]{10,}")),
    ("Shell trace of a secret line (set -x)", re.compile(r"^\S*\s*\+ .*(?i:password|secret|token|key_content)\S*=")),
]

def scan_text(name, text, hits):
    for n, line in enumerate(text.splitlines(), 1):
        for label, rx in RULES:
            m = rx.search(line)
            if m:
                shown = m.group(0)
                if len(shown) > 24:
                    shown = shown[:16] + "..."
                hits.append((name, n, label, shown))

def main(paths):
    hits = []
    for p in map(pathlib.Path, paths):
        if p.suffix == ".zip":
            if not zipfile.is_zipfile(p):
                print(f"{p}: not a zip archive (an error page from the API?)")
                continue
            with zipfile.ZipFile(p) as z:
                for info in z.infolist():
                    if not info.is_dir():
                        scan_text(f"{p.name}:{info.filename}",
                                  z.read(info).decode("utf-8", "replace"), hits)
        elif p.is_dir():
            for f in sorted(p.rglob("*.txt")):
                scan_text(str(f), f.read_text("utf-8", "replace"), hits)
        else:
            scan_text(str(p), p.read_text("utf-8", "replace"), hits)
    for name, n, label, shown in hits:
        print(f"{name}:{n}: {label}: {shown}")
    print(f"{len(hits)} possible secret(s) found")
    return 1 if hits else 0

if __name__ == "__main__":
    if len(sys.argv) < 2:
        sys.exit(__doc__)
    sys.exit(main(sys.argv[1:]))

Run it against everything you downloaded:

python3 scan_ci_logs.py ci-logs/*.zip

Each hit prints the file inside the archive, the line number, the rule that matched and the first 16 characters of the match, so the full secret does not end up in your terminal scrollback. The script exits with status 1 when it finds anything, which lets you use it in a script or a scheduled job.

Some notes on the rules, because each maps to a specific iOS habit:

  • The PEM rule catches a raw App Store Connect .p8 key, a private key exported from a .p12, or an SSH deploy key for your match repository being printed.
  • The base64 rule looks for the string LS0tLS1CRUdJTi, which is what -----BEGIN becomes when base64-encoded. If you store your .p8 as base64 for is_key_content_base64, a printed copy of it starts this way.
  • The password rules look for MATCH_PASSWORD, keychain and certificate password variables, and MATCH_GIT_BASIC_AUTHORIZATION followed by a value. They skip lines where Actions already replaced the value with ***, because that means masking worked.
  • The set -x rule looks for bash trace lines (they start with +) that assign something named like a password, secret, token or key.
  • The Google API key rule will often fire on Firebase configuration. Firebase API keys in GoogleService-Info.plist ship inside every copy of your app, so a hit there is usually low risk. Look at it, then decide.

The script was tested on Linux against a hand-made log archive with fake values: a traced MATCH_PASSWORD export, a masked MATCH_PASSWORD line, a base64 PEM, a raw PEM header and a fake Firebase key. It flagged all four planted lines (the traced export matched two rules), skipped the masked one, and reported a broken zip as "not a zip archive". Downloading logs from a real repository failed in the test environment because the API refused the request, so the fetch loop above has not been run end to end. It is a few lines of documented gh commands, but test it on one run first.

The script is a pattern matcher, so treat its output as a list of lines to read, not a verdict. It will miss a secret with no recognizable shape, such as a keychain password printed on its own without the variable name next to it. To catch that, search the logs for the actual value. Do it on your own machine and keep the value out of your shell history, for example by reading it from a file.

Check uploaded artifacts and build logs too

The log archive is only what the runner printed. Many iOS workflows also upload files when a build fails, so someone can read the full output later, and those uploads are a separate download that the scan above never opens. GitHub's announcement is about workflow logs and does not mention artifacts, so plan to check these yourself on every plan.

The usual candidate is the raw xcodebuild output. fastlane's gym documentation says that output is kept under ~/Library/Logs/gym, and a step that uploads that folder publishes every command the build ran. If a build setting or a run script phase received a secret as a plain value, it is in there. Download the artifacts of a run with the GitHub CLI, then list the files that contain a key header, a base64 key or a password assignment:

gh run download RUN_ID -D ci-artifacts
grep -rIlE -e '-----BEGIN [A-Z ]*PRIVATE KEY' -e 'LS0tLS1CRUdJTi' \
  -e '(MATCH_PASSWORD|KEYCHAIN_PASSWORD|P12_PASSWORD)=' ci-artifacts/

The command prints file names only, so a matching line does not land in your terminal history. It was run on a Mac against a sample folder holding one fake gym log with a traced MATCH_PASSWORD export, one file with a base64 key header and one clean file. It listed the first two and skipped the third. The download step was not run against a real repository for this post.

If a file is listed, open it in an editor, find the value and handle it as in Step 3. Then decide whether the upload is worth keeping. A build log attached to failed runs is useful for a week and a liability for the rest of its retention period, so give that upload step a short retention-days value or remove it once the signing problem is fixed.

Decide how urgent each hit is

A scan of three months of runs can return a long list. These are the questions that sort it, most urgent first.

What leakedWhat it opensHow fast to act
App Store Connect API key (.p8, raw or base64)Your App Store Connect account, within the key's role. Team keys reach every app.Revoke now, then replace.
MATCH_PASSWORD together with access to the certificates repoYour signing certificates and profiles, decrypted.Rotate now. Revoke certificates if the files may have been copied.
MATCH_PASSWORD alone, certificates repo private and its token not exposedNothing without the repo, but it is half of the pair.Rotate this week.
Git token or deploy key for the certificates repoThe encrypted files, and anything else that token can read or write.Revoke now.
AI or other paid API keySpending on your account.Revoke now.
Temporary keychain password created inside the jobA keychain on a runner that no longer exists, if you use GitHub-hosted runners.Fix the workflow. On a self-hosted Mac, delete that keychain as well.
Firebase API key from GoogleService-Info.plistThe same value that ships inside your app.Usually no action. Check the key's restrictions.

Two things move a row up the list. A public repository does, because anyone signed in to GitHub could have read the log. So does age: a value that has been sitting in logs for two months has had far more chances to be copied than one printed yesterday.

Step 3: if you find a real secret

Assume a secret that reached a log is compromised, even if the repository is private. Rotate first, then clean up. Deleting the log does not undo anyone who already read it.

App Store Connect API key

Apple's guidance is to revoke a key immediately if it is lost or compromised (Revoking API Keys). A team key is revoked by an Admin in App Store Connect under Users and Access, where you click Edit next to the Active keys, select the key, click Revoke Key and confirm. An individual key is revoked from your user profile under Individual API Key. Apple notes that a revoked key can't be reinstated, so create the replacement and update your CI secret right after.

When you generate the replacement, remember that the private key can be downloaded only once and Apple doesn't keep a copy (Creating API Keys). Give the new key the narrowest role your pipeline needs. Apple points out that team keys can access all apps regardless of role, and an Admin key can do things like create and delete users. A key that only uploads builds to TestFlight has no reason to be Admin.

match passphrase and the certificates repo

If MATCH_PASSWORD leaked, anyone who can also reach your certificates repository can decrypt your signing identities. Rotate the passphrase, and treat the Git credential for that repository as exposed too if MATCH_GIT_BASIC_AUTHORIZATION or a deploy key appeared. Revoke the personal access token or deploy key on GitHub and issue a new one. If you think the certificate files themselves were exposed, revoke and regenerate the certificates through your normal match process, because a passphrase change does not help with copies someone already decrypted. For a full audit of where signing files live, see AI Agents Took 300+ iOS Signing Certificates From 10 Shops. Audit Your Own .p12 Files.

Other tokens

GitHub tokens, Slack tokens and AI API keys get revoked in their own dashboards. If your app talks to an AI API, a leaked key there costs money, so revoke it before anything else.

Delete the logs that contain it

After rotating, delete the affected logs so the old value stops spreading. In the web interface, open the run and choose Delete all logs from the menu at the top right; you need write access. The API equivalent is DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs:

gh api -X DELETE "repos/OWNER/REPO/actions/runs/RUN_ID/logs"

Do this for every run that printed the value, not only the one the scanner found first. A re-run creates a new attempt, and the docs note that a partly re-run workflow's archive only holds the re-run jobs, so check earlier attempts as well.

Step 4: stop the next run from printing it

Rotation fixes this leak. The workflow change prevents the next one. A safer pattern for the App Store Connect key looks like this:

# .github/workflows/release.yml
name: iOS Release
on:
  workflow_dispatch:

jobs:
  testflight:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4

      - name: Write the App Store Connect key to a file
        env:
          ASC_KEY_P8_BASE64: ${{ secrets.ASC_KEY_P8_BASE64 }}
        run: |
          mkdir -p "$RUNNER_TEMP/asc"
          printf '%s' "$ASC_KEY_P8_BASE64" | base64 --decode > "$RUNNER_TEMP/asc/AuthKey.p8"
          chmod 600 "$RUNNER_TEMP/asc/AuthKey.p8"

      - name: Create a masked keychain password
        run: |
          KEYCHAIN_PASSWORD="$(openssl rand -hex 24)"
          echo "::add-mask::$KEYCHAIN_PASSWORD"
          echo "KEYCHAIN_PASSWORD=$KEYCHAIN_PASSWORD" >> "$GITHUB_ENV"

      - name: Build and upload to TestFlight
        env:
          ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
          ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
          ASC_KEY_PATH: ${{ runner.temp }}/asc/AuthKey.p8
          MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
        run: bundle exec fastlane beta

      - name: Remove the key file
        if: always()
        run: rm -f "$RUNNER_TEMP/asc/AuthKey.p8"

# In the Fastfile, read the key from the file:
#   app_store_connect_api_key(
#     key_id: ENV["ASC_KEY_ID"],
#     issuer_id: ENV["ASC_ISSUER_ID"],
#     key_filepath: ENV["ASC_KEY_PATH"]
#   )

A few choices in there are deliberate. The key is written to a file with printf and never echoed. The job uses key_filepath, so the key never becomes a second, decoded environment variable that masking doesn't know about. The temporary keychain password is generated in the job and passed to ::add-mask:: before anything else can print it, which is what the workflow commands docs ask for. The file is deleted in a step that runs even when the build fails.

Then go through your workflow files and remove the debugging leftovers:

  • Delete set -x from steps that touch secrets. If you need tracing, enable it around the lines you are debugging and turn it off with set +x before anything secret is expanded.
  • Remove env, printenv and echo lines that print variables holding keys, passwords or tokens.
  • Keep verbose: true off for match and other signing actions in CI. Turn it on locally when you need it.
  • Store each sensitive value as its own secret. Don't put a JSON blob with several credentials into one secret, since GitHub warns structured data can break redaction.
  • Lower log retention for public repositories, and for private ones if you don't need months of build history.

If an AI agent maintains your workflows, add these rules to the instructions it reads. One sentence such as "Never echo, print or trace environment variables in .github/workflows; use ::add-mask:: for generated secrets" in your CLAUDE.md or AGENTS.md saves you from arguing with the agent each time it adds a debug line. The agent's own settings need the same care: Claude Code's "Don't Ask Again" can save a password in your repo's local settings.

Lint the workflow files before they run

Scanning logs finds a leak after it happened. The habits that cause leaks are visible in the workflow file itself, so you can catch them in a pull request. This script reads every file under .github/workflows and flags shell tracing, commands that print the environment, echo or printf of a variable whose name looks like a secret, verbose flags on signing steps, step debug logging, and a base64 decode into a new variable. A line that writes the value to a file is left alone, because that is the safe pattern from Step 4.

#!/usr/bin/env python3
"""Flag workflow lines that tend to print secrets into GitHub Actions logs.

Usage: python3 lint_workflows.py [repo root]
Reads .github/workflows/*.yml and *.yaml. Read-only. Exits 1 if anything is flagged.
"""
import re
import sys
from pathlib import Path

SECRET_NAME = r"\w*(KEY|TOKEN|SECRET|PASSWORD|PASSPHRASE)\w*"
RULES = [
    ("shell tracing", re.compile(r"\bset\s+-[A-Za-z]*x|\bxtrace\b")),
    ("prints the environment", re.compile(r"^\s*(-\s*)?(run:\s*)?(printenv|env)\s*(\||$)")),
    ("echoes a secret-like variable", re.compile(r"\b(echo|printf)\b.*\$\{?" + SECRET_NAME)),
    ("echoes a secrets context value", re.compile(r"\b(echo|printf)\b.*\$\{\{\s*secrets\.")),
    ("verbose signing or build output", re.compile(r"verbose:\s*true|--verbose\b")),
    ("step debug logging", re.compile(r"ACTIONS_(STEP|RUNNER)_DEBUG:\s*['\"]?true")),
    ("decodes into a variable", re.compile(r"\w+=\"?\$\(.*base64\s+(-d|-D|--decode)")),
]
TO_FILE = re.compile(r">>?\s*\"?[\w$/{}.-]+")

root = Path(sys.argv[1] if len(sys.argv) > 1 else ".")
files = sorted(root.glob(".github/workflows/*.yml")) + sorted(root.glob(".github/workflows/*.yaml"))
hits = 0
for path in files:
    for number, line in enumerate(path.read_text(errors="replace").splitlines(), 1):
        if line.lstrip().startswith("#"):
            continue
        for name, rule in RULES:
            if not rule.search(line):
                continue
            writes_file = TO_FILE.search(line) and "GITHUB_STEP_SUMMARY" not in line
            if name.startswith("echoes") and writes_file:
                continue  # written to a file, not to the log
            print(f"{path}:{number}: {name}: {line.strip()[:90]}")
            hits += 1
print(f"{len(files)} workflow file(s), {hits} line(s) to review")
sys.exit(1 if hits else 0)

It was run on a Mac with Python 3.12 against two sample workflows, one clean and one with seven risky lines planted in it. It flagged all seven and nothing else:

release.yml:7: step debug logging: ACTIONS_STEP_DEBUG: true
release.yml:15: shell tracing: set -euxo pipefail
release.yml:16: echoes a secret-like variable: echo "Key: $ASC_KEY_CONTENT"
release.yml:17: echoes a secrets context value: echo "pass ${{ secrets.MATCH_PASSWORD }}"
release.yml:18: decodes into a variable: P12_PASSWORD="$(echo "$P12_B64" | base64 --decode)"
release.yml:19: prints the environment: printenv | sort
release.yml:23: verbose signing or build output: run: bundle exec fastlane match appstore --readonly --verbose
2 workflow file(s), 7 line(s) to review

The paths are shortened here. The sample also held a commented-out echo, a printf that writes the key to a file and an echo of a build number, and none of those were flagged. Like the log scanner, this is a pattern matcher. It will flag a harmless --verbose on a lint step and it will miss a secret passed through a variable with an innocent name, so read each hit before you change anything.

The script exits with status 1 when it finds something, so it can run as a required check on pull requests that touch .github/workflows. That is the cheapest place to stop an agent's debug line, because the reviewer sees it before a single run has printed anything.

Step 5: scan every run automatically

You can approximate GitHub's new feature on any plan by running the scanner after each build. A workflow triggered by workflow_run starts when your build workflow finishes, downloads that run's logs, and fails if the scanner finds something. A red check on your Actions tab works as the notification the preview doesn't send yet.

# .github/workflows/scan-logs.yml
name: Scan build logs for secrets
on:
  workflow_run:
    workflows: ["iOS Release"]
    types: [completed]

permissions:
  actions: read
  contents: read

jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Download the finished run's logs
        env:
          GH_TOKEN: ${{ github.token }}
          RUN_ID: ${{ github.event.workflow_run.id }}
        run: gh api "repos/${{ github.repository }}/actions/runs/$RUN_ID/logs" > run-logs.zip

      - name: Scan the logs
        run: python3 scripts/scan_ci_logs.py run-logs.zip

This assumes the build workflow is named "iOS Release" and that scan_ci_logs.py is committed under scripts/. The job only reads logs and checks out the default branch, so it doesn't run code from pull requests. Keep it that way; workflow_run jobs run with the base repository's permissions, so they should never check out and execute a fork's code. This workflow follows the documented events and endpoints but has not been run on GitHub, so watch the first couple of runs.

If your company does have Enterprise Cloud

If you work at a company on GitHub Enterprise Cloud with Secret Protection or Advanced Security, ask your enterprise owner to turn the preview on. It catches provider tokens with validity checks that a regex script can't do. Then plan for its gaps. No notifications means someone has to check the alert list on a schedule. No custom patterns means your match passphrase and keychain passwords are outside its coverage. And no backfill means the logs from before the switch still need the manual scan above.

FAQ

Does GitHub's new log scanning work on free or Pro accounts?

No. The November 9 preview is limited to GitHub Enterprise Cloud enterprises with GitHub Secret Protection or GitHub Advanced Security. On other plans, scan your logs yourself.

Doesn't GitHub already hide secrets in logs?

It masks the exact values of secrets it knows about. Values you transform, such as a base64-decoded key, or values generated during the job, are printed unless you register them with ::add-mask::.

Will deleting the log make the leaked key safe?

No. Anyone who saw or downloaded the log still has the value. Revoke or rotate the secret first, then delete the logs.

How far back should I scan?

As far back as your logs go. With the default 90-day retention, that is about three months of runs.

If you use Claude Code on iOS projects, my store has Claude Code + Xcode: The Production iOS Workflow Kit ($18+). It is a set of Claude Code commands, agents and rules for SwiftUI and UIKit work, including a privacy and security rule and CI and release-readiness agents, plus a runnable Xcode sample. It doesn't replace the scan above, but it gives your agent written rules about secrets and release safety from the start.

Sources