Interview Prep/DevSecOps/Secrets and Identity Management

A developer created a GitHub personal access token with full `repo` and `admin:org` scopes for a script. How do you respond?

BeginnerScenarioSecrets and Identity Management
Answer

Situation read → A classic PAT with org admin scope, owned by one human, is a huge blast radius.

What I'd do →

  1. Ask what the script needs, then replace the token with a fine-grained PAT limited to the needed repos and permissions with an expiry.
  2. For automation, prefer a GitHub App with installation tokens that last one hour.
  3. Revoke the classic token.
  4. Set an org policy requiring approval for fine-grained PATs and restricting classic PATs.

Why → GitHub Apps are not tied to a person and have scoped, short-lived tokens.

Interview tip → Say "automation should never run as a human".

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Secrets and Identity Management