Skip to main content
LupoSec
← All posts
Field notes 25 November 2026

Your CI shouldn't hold long-lived cloud keys

Your CI shouldn't hold long-lived cloud keys. Federate CI to AWS or GCP with OIDC. One scoped role per pipeline purpose. Prod deploys only from protected branches

If your CI pipeline still holds a long-lived cloud access key, that key is one of your most valuable secrets, and it sits in one of the least-watched places.

Many pipelines are built for speed first. Secrets get added as repo or org variables, scoped broadly, and rarely rotated. Every job, every branch and every third-party action may be able to reach them.

The fix is usually smaller than teams expect: federate CI to your cloud with OIDC and drop static keys entirely.

A practical sequence for this week:

  • Inventory every static credential in your CI settings and note what it can access
  • Set up OIDC trust between your CI provider and AWS or GCP
  • Create one role per pipeline purpose (plan, deploy, publish), not one admin role
  • Restrict trust conditions to specific repos, branches or environments
  • Make production deploy roles assumable only from protected branches
  • Delete the old keys once the new roles are proven

Speed doesn’t suffer. Credentials are short-lived and issued per job, so there is nothing to rotate and far less to leak from a log or a compromised dependency.

We do this work both embedded with platform teams and as turn-key projects delivered as code with runbooks. More at luposec.io.

Want help with this?

Our engineers do this work every day, as embedded professional services or as a turn-key project.

Start a conversation →