Back to blog

Why do API keys keep leaking from automation platforms?

Thắng Đoàn
Thắng Đoàn

You connected a dozen tools to your automation platform, and now a key that opens your database sits in a config file somewhere. When it leaks, you may not even be able to tell which service exposed it.

Speed demands secrets everywhere

Automation platforms run on API keys, database credentials, and IAM permissions. OWASP's Secrets Management Cheat Sheet states that many organizations hardcode these in plaintext source code and scatter them across configuration files and configuration management tools. The same cheat sheet notes that services often share the same secret, which makes identifying the source of a leak challenging. The platform did not break. Your secret handling just scaled faster than your controls.

  • Keys live in source code, configs, and CI systems at once
  • One shared secret means one leak touches everything

The leak is a management gap, not a bug

OWASP describes a growing need to centralize the storage, provisioning, auditing, rotation, and management of secrets. Most teams do none of these. Rotation fails organizationally because a key created for a quick demo has no owner, and no owner means no one is accountable for retiring it. OWASP also stresses high availability: your secret store must handle real traffic, because if workflows cannot fetch credentials, engineers will paste them inline again.

Start with the platform's own vault

A vault is a central store that holds credentials so code never contains them. GitHub's documentation shows a workable pattern: create secrets at repository, environment, or organization level, then workflows reference them without exposing values. Creating a secret requires write access, which gives you basic ownership by default. This is not perfect isolation, but it removes keys from code and logs.

  • Scope secrets at org, environment, or repo level
  • Prefer referencing secrets over copying values

What this does not solve

OWASP's Top 10 exists because awareness alone does not change how teams ship code. Adopting a vault does not stop a compromised workflow from using a valid secret. And per the cheat sheet, incident response still struggles when services share credentials. Rotation, auditing, and per-service secrets remain manual work you must fund. No platform feature does it for you.

If a key leaked today, could you name every service that uses it within an hour?
Which of your automation workflows holds a secret no one has rotated since it was created?

List every secret your most-used automation platform stores, and mark each one shared, rotated, or unknown.

Sources

OWASP Top 10

OWASP Secrets Management Cheat Sheet

GitHub Docs: Using secrets in GitHub Actions

Share:

Recommended for you

Enjoyed this article?

Subscribe for new articles. No spam. Unsubscribe anytime.

By subscribing you agree to receive the newsletter. No spam, and you can unsubscribe anytime.