Loading…
Loading…
A new colleague (first PR!) creates a Stripe integration: chargeCustomer, webhook verification, getUserProfile. None of the files existed before. Your job as security reviewer is to walk the diff and find every leak: to git, logs, and API responses.
Secrets leak in three main ways: 1. **Git commit** — hardcoded in code, .env committed, backups in the repo. 2. **Logs** — `console.log(user)`, `console.error(err)`, logging headers with Authorization. 3. **API response to the client** — fields that shouldn't be in the response (passwordHash, internalNotes, privateKey). Plus subtleties: - timing attacks when comparing secrets - axios errors contain request headers - error stacks can reveal internals Walk the code and find problems in all three categories.