5 Secrets Rotation Myths That Keep Leaked Credentials Working

"We rotated the key, we're fine" is how leaked credentials stay usable. A beginner-friendly look at five myths about revocation, blast radius and secret sprawl, and how to fix each one.

November 01, 2026
Victor Nthuli
Security Best Practices
5 min read

Table of Contents

Loading...

Say you lose your house key. You get a new one cut and feel better. But you never changed the lock, so the old key still opens the front door.

A lot of teams handle leaked passwords and keys the same way. They make a new one, call the job done, and the leaked one keeps working. This post goes through five common beliefs about “rotating secrets” and explains what actually happens in each case.

First, some plain-language terms

Term What it means Everyday analogy
Secret Anything that proves identity to a system: passwords, API keys, tokens, certificates A house key
API key A long string a program uses to log in to a service A key card for a building
Rotation Creating a new secret and switching your systems over to it Cutting a new key
Revocation Making the old secret stop working Changing the lock
Blast radius Everything a secret can reach if someone steals it Every room the key opens
Secret sprawl Copies of a secret scattered in many places Spare keys under mats, in cars, with neighbours

Myth 1: “We rotated the key, so the old one is dead”

Rotation and revocation are two separate steps. Many services let one account have two or more active keys at the same time. That’s deliberate: you can move your apps to the new key without any downtime. It also means the old key keeps working until someone disables or deletes it.

Comparison showing that rotation creates a new secret while revocation disables the old one

How to check: - List every active key for the account or service. - Make sure the leaked key shows as disabled or deleted, not just “unused”. - Look in the logs for any login attempts that still use the old key after you revoked it. Those attempts are a warning sign.

Myth 2: “Rotating fixes the leak”

Revoking a key stops anyone from using it in the future. It does nothing about what happened while the key still worked.

Picture a burglar who copied your spare key. Changing the lock won’t tell you what they took, or whether they left a window unlocked so they can come back. In computer terms, someone who gets in may set up their own user accounts or keys. Security people call this persistence: a way back in that doesn’t depend on the key they stole.

Ordered steps for responding to a leaked credential

You need to check the audit logs (records of who did what, and when) for the whole stretch between when the key leaked and when you revoked it. Look for: - New users, keys or access permissions that someone created - Data that was downloaded or exported - Logins from places or networks you don’t recognise

Myth 3: “It was only one key, so the damage is small”

How bad a leak is depends on what the key can reach, not on how many keys leaked. One key with administrator rights can open the whole account.

Type of secret What it might reach Question to ask
Cloud admin key Every server, database and storage bucket Could it create new users?
Database password Customer records Read-only, or able to change data?
Code repository token Source code and build pipelines Could it change code before it ships?
Chat or email bot token Messages and files Could it post as a trusted user?

Steps to work out how much damage a leaked secret could cause

How to make the blast radius smaller: - Least privilege: give each key only the permissions it really needs. - Use a separate key for each app and each environment (testing vs. live). - Use short-lived credentials where you can. These are tokens that expire by themselves, often within hours.

Myth 4: “We know where all our secrets are”

Secrets spread around quietly. A developer pastes a key into a chat to fix a problem quickly. A build log prints out a setting. Someone deletes a password from a file, but it’s still in the project’s version history, the saved record of every past change to the code.

Common places secrets end up and how to find them

If you rotate a key but miss one copy of the old one, that copy will still work until you revoke the key itself. That’s why you revoke the key itself and don’t just tidy up the copies you know about.

How to reduce sprawl: - Keep secrets in one central secrets manager, a locked vault that apps ask for keys when they need them. - Turn on secret scanning in your code repositories. Add checks that block a commit if it contains a secret. - Treat any secret pasted into chat, tickets or wikis as leaked.

Myth 5: “Rotation is a once-a-year chore”

When rotating is manual and nerve-wracking, people avoid doing it. Then, during a real incident, the team finds out nobody knows which systems use the key, and switching it breaks them. Being slow at this point gives an attacker more time.

Comparison of manual and automated secret rotation

The fix is to make rotation boring. Automate it, rehearse it, and keep a list of which systems depend on each secret. If you’d have to rotate everything at short notice, perhaps because your hosting provider tells you to, you want that to be a routine job and not a weekend-long emergency.

What to learn from this

  • Revoke, don’t just rotate. The job isn’t done until the old secret fails when someone uses it.
  • Look backwards. Check the audit logs for the whole time the secret was exposed, and remove any users or keys an attacker created.
  • Shrink the blast radius ahead of time. Use least privilege, separate keys for each app, and short-lived credentials.
  • Treat every copy as live. Use a secrets manager and scanning to find copies in code history, logs and chat.
  • Practise rotation before you need it. Automated, rehearsed rotation turns an emergency into routine work.

Tags

secrets credentials incident response cloud security

Victor Nthuli

Security Operations Engineer specializing in incident response, threat hunting, and compliance alignment for regulated industries.

Related Posts

November 01, 2026

Build Your First Malware Analysis Lab in One Weekend

Isolated VMs, a fake internet, strict snapshots, a shared Ghidra server and YARA: a two-day build for analysing real samples without exposing your home network.

Read More
October 20, 2026

RustVault: I Built My Own Password Vault, Then It Tried to Lock Me Out

RustVault is a password vault and privacy toolkit written in Rust that runs only on your own machine. Building it meant finding a deadlock that locked out the owner after five logins, a backup screen that made up its numbers, and a password reset that silently destroyed every saved entry. All three are fixed, and this is the story of how.

Read More

Table of Contents

Loading...

Recent Posts

  • Build Your First Malware Analysis Lab in One Weekend

    November 01, 2026

    Read Post
  • 5 Secrets Rotation Myths That Keep Leaked Credentials Working

    November 01, 2026

    Current Post
  • RustVault: I Built My Own Password Vault, Then It Tried to Lock Me Out

    October 20, 2026

    Read Post
  • Responsible Disclosure: Browser DevTools and Direct File Access in SlidesGPT

    April 01, 2025

    Read Post
  • Bluewave vs Uptime Kuma: A Real-World Comparison for Monitoring Uptime and Beyond

    March 26, 2025

    Read Post
  • Nextcloud

    March 25, 2025

    Read Post
  • 🔍 Keeping Your Linux Services in Check: How I Use Monit for Bulletproof Monitoring 🚨

    March 23, 2025

    Read Post

About the Author

Victor Nthuli is a Security Operations Engineer with expertise in incident response, SIEM implementation, and threat hunting. With a background in cybersecurity and a passion for Linux systems, he provides insights based on real-world experience.

Learn More

Subscribe for Security Updates

Get notified when new security articles and insights are published.

Need Enterprise Security Solutions?

Visit SocDev Africa for comprehensive security services and software development solutions for your organization.

Visit SocDev.Africa