Interview Prep/Git & GitHub/Secrets, Signing and Security

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 →

  1. Revoke the PAT and remove the SSH and signing keys from the account (Settings → SSH and GPG keys).
  2. Check the account's security log and org audit log for activity since the theft.
  3. Rotate secrets the developer had access to; review recent pushes, new deploy keys, webhooks and Actions changes.
  4. 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.

All Git & GitHub questions Roadmap: Git & GitHub

More on Secrets, Signing and Security