skip to content

You inherit a system with several hundred long-lived credentials spread across services, pipelines and machine accounts. How do you decide which ones to fix first, and what does "fix" mean for each?

level: principalimportance: should knowfreq 38%

answer

  1. score = exposure x privilege x sensitivity
  2. multipliers: shared (no attribution) + costly rotation (no response)
  3. client-shipped = already public
  4. order: rotate cheaply → split → scope → shorten → detect
  5. CI/CD and issuer credentials inherit everything

basics

~20 s

Rank by exposure times privilege times data sensitivity, adjusted upward when the credential is shared, unattributable or hard to rotate. Fix in that order: build cheap rotation first, then split shared credentials per principal, narrow scope, shorten lifetime, and only then scan.

solid answer

~50 s

Treat it as a portfolio, not a checklist. Score each credential on three axes: **exposure** (how many principals and stores hold it — anything in a client-distributed artifact is already public), **privilege** (what it authorizes if used — one bucket versus administrative control), and **sensitivity** of what it reaches. Then adjust upward for two multipliers people forget: a credential shared by many services destroys **attribution**, so you cannot tell who leaked it and cannot revoke without an outage; and one that is expensive to rotate is effectively unrevocable, which means you have no incident response for it. Sequence the work accordingly: make rotation cheap first, because everything else depends on it; split shared credentials into one per principal; narrow scope so a disclosure is a small loss; shorten lifetime, ideally replacing static credentials with issued short-lived ones; and turn on scanning once you can act on hits.

go deeper

for a junior

Say the highest-privilege and most widely copied credentials come first, and that a credential inside anything shipped to users should be treated as public.

for a middle

Give the exposure/privilege/sensitivity scoring and note that shared credentials are worse because you cannot tell who used them or revoke just one.

for a senior

Lead with sequencing — cheap rotation first, then split per principal, then scope, then shorten lifetime, then detect — and explain why detection before rotation capability produces an unusable backlog.

for a principal

Frame it as portfolio risk reduction with explicit multipliers for lost attribution and rotation cost, single out credentials that can obtain other credentials or change what deploys, and pick time-to-revoke as the metric that survives scrutiny.

## Why ranking is the actual skill With hundreds of credentials, everything cannot be fixed, and the naive orderings are wrong. Working alphabetically, or by whichever team responds, or by whatever a scanner surfaced first, all ignore that the credentials differ in expected cost by orders of magnitude. The goal is to reduce expected loss per unit of engineering effort, so you need a model of loss. ## The three primary axes **Exposure — how many principals and stores can reach it.** Count copies honestly: how many humans can read it, how many pipelines reference it, how many machines hold it on disk, whether it appears in a manifest that a wide group can view, whether it ever passed through a log. The extreme point is a credential embedded in anything distributed to users — a browser bundle, a mobile package, a customer-installed agent — which should be scored as already public, since extraction is a one-time cost the attacker pays and can share. **Privilege — what it authorizes.** The right question is what the *holder* can do, not what the service currently does. A credential with administrative rights that is used only for one read is scored on the rights, because compromise grants the rights. Watch for credentials whose privilege has drifted upward over years of "just add this permission to unblock the release". **Sensitivity — what it reaches.** Regulated personal data, financial movement, and anything that can alter the deployment or build path score highest. Credentials that reach the CI/CD system or a package registry belong near the top of every list, because they let an attacker change what runs everywhere and reach every other credential — a credential that can obtain other credentials inherits the union of their privilege. ## The two multipliers people miss **Shared credentials destroy attribution and make revocation an outage.** When forty services present the same value, authentication logs cannot tell you which one is misbehaving, an anomaly cannot be traced to an owner, and revoking to contain a suspected leak breaks all forty at once. The predictable consequence under pressure is that nobody revokes. One credential per principal is therefore not tidiness; it is what makes both detection and containment possible, and it is usually the highest-leverage structural change available. **Rotation cost is a risk multiplier.** A credential that takes a week of coordination to change is one you will not change when it is exposed. Cost-to-rotate belongs in the score directly, and it explains the sequencing below: capability precedes cadence. ## Sequencing the work 1. **Make rotation cheap and rehearsed.** Overlapping validity of two generations, generation identifiers recorded in authentication logs so retirement is evidence-based, consumers that re-read rather than freeze at startup, and an automated re-issue path. Until this exists, every other finding is a report you cannot act on. 2. **Split shared credentials into one per principal.** This restores attribution and makes revocation surgical, and it converts "we cannot revoke" into "we can revoke one thing". 3. **Narrow scope.** Reduce each credential to the operations and resources its holder genuinely needs, ideally constrained to specific resources rather than whole services. Scope does not prevent disclosure; it decides what disclosure costs, and it is durable in a way that alerting is not. 4. **Shorten lifetime, and prefer issuance to storage.** Replacing static values with short-lived credentials obtained via an attested workload identity removes the durable bearer value entirely. It is the structural-separation rung and the only change that eliminates the class rather than bounding it. It also shifts defensive attention to the issuance path, which is a smaller and more monitorable surface. 5. **Turn on detection.** Scanning of repositories, history, pipelines and build artifacts, plus alerting on credential use that deviates from an established pattern — now genuinely useful, because a hit produces a rotation rather than a ticket. ## What "fix" means, case by case - **In a client-distributed artifact:** architectural. Move the privileged operation behind a server-side component; give the client its own per-install or per-user revocable identity. Obfuscation is not on the table. - **Shared static credential across services:** split per consumer, then rotate each independently; if the verifier permits only one secret per identity, create per-consumer identities instead. - **High-privilege pipeline credential:** scope to the specific repositories and artifacts, replace with short-lived issued credentials tied to the pipeline's identity, and constrain which branches or workflows may request it. - **Legacy system with no rotation support:** you cannot fix the credential, so contain it — isolate the network path, restrict which hosts may authenticate, add monitoring for use outside the expected source, and treat that containment as compensating rather than curative. ## What to report upward Executives cannot use a list of hundreds. Report the small number of credentials whose compromise would be materially damaging, the current time-to-revoke for each, and the trend in that number. Time-to-revoke is the honest single metric, because it captures whether the organisation can actually respond, whereas count-of-secrets-found measures how hard the scanner was tuned.

  • Which single credential class would you look at first, and why?
    Anything that can obtain other credentials or alter what gets deployed — the secrets broker's own access, CI/CD tokens, package-publishing keys. Their privilege is the union of everything they can reach, and compromise there defeats improvements made everywhere else, since the attacker can simply modify what runs. They are also usually shared and long-lived, which stacks both multipliers.
  • What single metric would you report to leadership about this programme?
    Median and worst-case time-to-revoke for the credentials in the top risk tier. It measures the capability that actually determines incident outcome, cannot be gamed by tuning a scanner, and improves only when the underlying mechanics — overlap, generation identifiers, re-readable consumers, automation — genuinely improve. Count of secrets found measures detection effort, not risk reduction.
  • A legacy vendor system supports exactly one static password and no rotation. How do you handle it?
    Accept that the credential cannot be fixed and contain it instead: restrict the network path so only specific hosts can reach the system, restrict which source addresses may authenticate, monitor for use outside the expected window and source, and minimise the number of holders. Document it as an accepted risk with the compensating controls named, and put replacement on the roadmap rather than pretending scanning covers it.

saying these in an interview costs you the question

  • Ranking by scanner hit count rather than by what each credential authorizes.
  • Scoring a credential on what the service does today rather than on what the credential permits.
  • Treating a secret shipped in a mobile or browser artifact as protectable by obfuscation.
  • Rolling out detection before the organisation can rotate quickly.
  • Keeping one shared credential across many services because splitting is inconvenient.

context