Agent Wranglers

TKO-2Required

Rotate every secret the previous team could read

Replace every API key, database password, signing key and token that existed before the handover. Revoke the old values, so they stop working.

How to do it

Anyone who had the code, a laptop with an env file or a chat with pasted keys still holds the old values. Find them in the env files, the full git history and each account from Take control of every account before touching the code. A secret scanner over every commit finds keys that were deleted from the code but never revoked, as Scan the whole history for secrets says. Put the new values in a store, as Keep secrets in a secrets store says. Rotate signing keys for sessions last, since rotating them signs every user out.

How to check

Every entry in the secrets store has a creation date after the handover date. A call with each old key, kept aside for the test, fails with an authentication error.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/codebase-takeover/triage/rotate-inherited-secrets">Agent Wranglers codebase takeover playbook</a>. In code you write, add a comment next to it with the same link.