5 min readBy JJ Eaton

What getting hacked taught me about API keys and old apps

One forgotten app out of 20 was breached and its keys were used to email about 25,000 people. Here's why usage limits saved me, and what I changed.

I got hacked recently. It didn't come through the apps I work on every day. It came through one I had basically forgotten about.

This is what happened, what limited the damage, and what I'd tell any business owner to check this week.

What happened

When Railway, the hosting platform I use, had an outage, one of my projects was breached. I had more than 20 projects hosted there. As far as I can tell, only one was actually broken into: an old app I coded myself three or four years ago, before I was building with AI, and which I hadn't updated in over 12 months.

From that one project, the attackers got access to three sets of credentials:

  • Supabase keys (the database)
  • Resend keys (the email sending service)
  • AWS credentials

They used the email keys to send messages to around 25,000 email addresses.

Why it wasn't a disaster

Every one of those services had strict usage limits in place. So when the keys were stolen, there was a ceiling on how much damage could be done with them, and I was able to rotate the keys (replace them with new ones and switch off the old ones) without too much hassle.

That's the whole difference between a bad afternoon and a very bad month. Stolen AWS credentials with no limits can turn into a huge bill. A stolen email key with no limits can wreck your sending reputation or get your domain blocked. Limits don't stop a breach, but they cap what a breach can cost you.

I want to be fair to Railway here. It's still an amazing platform, and I still use it. Incidents like this will keep happening on any and all platforms. The lesson isn't "pick a different host". It's "assume one of your keys will leak one day, and plan for it".

The old app was the weak spot

The part that stuck with me is which app got hit. Not the projects I touch every week. The old one nobody was looking after.

Most businesses have one of these. A booking form from a previous agency. An internal tool a contractor built years ago. A marketing microsite that still has live keys to your email platform or your cloud account. Nobody owns it, nobody updates it, and it quietly holds credentials to systems you care about.

Attackers don't need to get into your best-protected system. They only need the forgotten one that shares its keys.

What I changed

The first rotation was manual. I didn't have automation in place for it, so I went through each service and replaced the keys by hand.

After that I moved my secrets off the hosting platform entirely. They now live in Doppler, a dedicated secrets manager, and my apps fetch and cache them on a set interval. A practical bonus: I no longer need a new build every time I want to change a secret, so rotating a key is quick instead of a chore. And when rotating is easy, you actually do it.

What this means for your business

You don't need to be a developer to act on this. These are the questions I'd ask your team or your tech provider:

Do our keys have usage limits?

For every service that bills by use or can send messages on your behalf (cloud hosting, email, SMS, AI providers, payments), check whether there's a spending or usage cap. If a key leaked tonight, what's the most it could cost or send?

Which old apps still hold live credentials?

Make a list of every site, tool and integration that's still running, including the ones nobody talks about. If something isn't used, switch it off and revoke its keys. If it is used, someone needs to own it and keep it updated.

How long would it take us to rotate a key?

If the honest answer is "we'd need to rebuild and redeploy several apps" or "we're not sure where that key is used", that's worth fixing before you need it. Keeping secrets in one dedicated place makes this much faster.

Does each app have its own keys?

Sharing one set of credentials across many projects means one weak app exposes all of them. Separate keys per app keep a breach contained, the same way mine stayed inside one project.

This matters more as you add AI

As businesses connect AI tools and agents to their systems, the number of keys floating around goes up fast. Every new integration is another credential that can leak. The habits above (limits, ownership, easy rotation, separate keys) are cheap to set up now and much harder to retrofit later.

Where to start

If you're not sure what's exposed, start from the outside. Our free website security assessment looks at your website the way an outsider would and tells you what we find, in plain English. If you're planning to bring AI into your business and want the security side done properly from day one, an AI readiness audit covers that too. We're based in Perth, Australia, and work with businesses wherever they are.

Sources