A developer's laptop was stolen, and it had a personal access token and SSH key for GitHub.
AdvancedScenarioSecrets, Signing and Security
Answer
Situation read → Assume an attacker can push, read private code and use the token.
What I'd do →
- Revoke the PAT and remove the SSH and signing keys from the account (Settings → SSH and GPG keys).
- Check the account's security log and org audit log for activity since the theft.
- Rotate secrets the developer had access to; review recent pushes, new deploy keys, webhooks and Actions changes.
- Enforce SSO, short-lived credentials and hardware-backed keys going forward.
Why → Access is tied to credentials, not to the person's laptop.
Interview tip → Fine-grained PATs with expiry reduce the blast radius.
More on Secrets, Signing and Security
A developer pushed an AWS access key to a public repo 10 minutes ago. What is your first move?BeginnerAfter rotating the leaked key, you must purge it from repository history. How?AdvancedA push is rejected: "GH013: Repository rule violations found ... Push cannot contain secrets". What do you do?IntermediateSecret scanning alerts have piled up, and many look like false positives or old test credentials.IntermediateYou must set up signed commits on your laptop. Which method do you pick?BeginnerYour GPG signing key expires next week. What is the correct way to handle it?Intermediate