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 →
- Ask what the script needs, then replace the token with a fine-grained PAT limited to the needed repos and permissions with an expiry.
- For automation, prefer a GitHub App with installation tokens that last one hour.
- Revoke the classic token.
- 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".
More on Secrets and Identity Management
A team stores database passwords in a `.env` file committed to a private repo. How do you migrate them out?BeginnerYour CI pipeline uses long-lived AWS access keys stored as repository secrets. How do you replace them?IntermediateAn auditor asks how often you rotate database credentials. You currently never do. What do you build?IntermediatePods need AWS access. A developer mounted an IAM user's keys as a Kubernetes Secret. What do you propose instead?BeginnerShould you use Kubernetes Secrets, Sealed Secrets, External Secrets Operator or the Secrets Store CSI driver?IntermediateA Slack webhook URL and a Stripe live key were posted in a public GitHub issue. What is your response sequence?Beginner