CyberPrism Logo

CyberPrism.App

Illuminating vulnerabilities from every angle

Back to resources

Incident Response

Exposed Secrets on GitHub: Incident Response Checklist

Respond to exposed GitHub secrets: revoke credentials, investigate cloud access, check downstream exposure, and verify recovery with an evidence checklist.

Updated 2026-11-26 · 3 min read

Containment

Invalidate the exposed credential

Verify revocation at the issuing service; deleting code does not revoke access.

Investigation

Trace the identity and its permissions

Review authentication, resource access, and changes during the exposure window.

Recovery

Check downstream credentials

Identify additional secrets the compromised identity could retrieve.

Useful CyberPrism references

What should you do when a secret leaks on GitHub?

Immediately revoke the exposed credential at its issuing service, replace it where needed, and investigate activity associated with its identity. Deleting the file or making the repository private does not invalidate a copied secret. [GitHub remediation guidance](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository).

As of November 26, 2026, a timely reason to review this workflow is Microsoft's November 5 report: attackers used agentic AI tooling to find secrets in public GitHub repositories and conduct follow-on cloud attacks. The report includes abuse of application credentials to access Azure resources. [Microsoft research](https://www.microsoft.com/en-us/security/blog/2026/11/05/threat-actors-use-agentic-ai-tooling-to-find-and-abuse-exposed-secrets/).

Identify the credential and exposure window

Record the repository, file path, commit identifier, earliest known public exposure, discovery time, credential identifier, issuing service, and owner. Keep the secret value out of ordinary tickets and chat; preserve necessary evidence in restricted storage without delaying revocation.

Map the credential to its application or account, permissions, environments, and dependent workloads. GitHub's unknown validation status does not establish safety, and an inactive credential still requires a check for prior unauthorized access. [GitHub alert evaluation](https://docs.github.com/en/code-security/tutorials/remediate-leaked-secrets/evaluating-alerts).

Revoke access and verify the replacement

Have the credential owner invalidate the exposed key or secret, update affected workloads through the approved secret store, and verify normal operation. Creating a replacement is insufficient if the old credential remains enabled.

Record provider-side revocation evidence and check the service's handling of already-issued tokens or sessions. If malicious activity continues, escalate containment to the affected identity or workload and verify that the activity stops.

Investigate access beyond the original secret

Review available authentication and resource audit logs from the earliest known exposure through containment. For an Azure application identity, examine service principal sign-ins, secret-store access, resource changes, and unexpected data retrieval; correlate identity and timestamps rather than relying on an IP address alone.

Microsoft observed attackers using compromised application credentials to obtain additional credentials and data. Identify what the affected identity could retrieve, then investigate those resources and revoke downstream secrets where exposure is established or cannot reasonably be excluded. [Microsoft attack analysis](https://www.microsoft.com/en-us/security/blog/2026/11/05/threat-actors-use-agentic-ai-tooling-to-find-and-abuse-exposed-secrets/).

Separate confirmed misuse from possible access. Record missing logs and retention limits so the incident owner can see what remains unresolved.

Clean up the repository and close with evidence

After credential containment, remove embedded secrets and decide whether history cleanup is necessary. Coordinate any rewrite with repository owners: copies can remain in forks, clones, and cached references. [GitHub cleanup guidance](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository).

Close with evidence that the old credential is invalid, dependent workloads function, the exposure window was investigated, and downstream findings have owners. Use the [RIPD framework](/ripd) to prioritize remaining work, including removing hard-coded credentials and reviewing excessive application permissions.

FAQ

Is deleting a leaked API key from GitHub enough?

No. Revoke the key at the service that issued it and replace it where required. Repository cleanup cannot invalidate copies someone already obtained. [GitHub guidance](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository).

Can an inactive secret scanning alert be closed immediately?

An inactive result addresses current credential validity, not past misuse. Review activity during the exposure window and record any investigation gaps before closing the incident. [GitHub alert guidance](https://docs.github.com/en/code-security/tutorials/remediate-leaked-secrets/evaluating-alerts).

Try CyberPrism

Track CVEs, threat actors, breaches, ransomware activity, and vendor exposure from a mobile-first cybersecurity app.