Credential rotation is the practice of replacing passwords, API keys, access tokens, certificates, or signing keys after a suspected exposure window. The goal is to invalidate anything an attacker may have copied, reused, or forged while limiting the lifetime of trust in a secret.
In cyber security, rotation matters because stolen credentials are often more useful than malware: they can bypass perimeter defenses, blend into normal automation, and survive system cleanups. After a supply-chain compromise, a malicious plugin, or any incident that may have touched CI/CD jobs, teams often rotate secrets used by build systems, scanners, deployment tools, and service accounts. Good rotation is paired with revocation, least privilege, and inventory of where each secret is stored or embedded. If the secret cannot be rotated quickly, exposure may continue even after the original attack vector is removed.


