Integrations

How do you keep integration and automation tokens from becoming a breach?

Give every integration its own short-lived credential, prefer workload identity, and treat revocation as done only when the old key fails.

2 min readDEV GroupIntegrations & data movement · Security

How a token becomes a breach

Give every integration its own narrowly scoped, short-lived credential, prefer workload identity over stored secrets, and treat revocation as done only when the old credential is proven to fail. Public reporting from October 2026 shows how the alternative goes. A supply-chain compromise of an AI gateway project traced back to an admin key that had leaked and was believed revoked, but still worked. An automation platform held an unscoped org-owner CLI token, so whoever had it could bypass branch protection and publish a malicious release. A separate advisory described a deploy integration that wrote AI provider keys in clear text into committed files. None of these needed a novel exploit. Each was a token with too much reach, too long a life, or no owner.

One token, one integration

Issue one token per integration, never one shared across several, so a leak has a known blast radius and can be cut without breaking everything else. Grant the minimum: the repositories, scopes, and actions that integration uses, read-only where it only reads. Set short lifetimes and rotate on a schedule, so a leaked token expires on its own. For CI and bots, use OIDC or workload identity: the job proves what it is at run time and receives a credential that lasts minutes. There is no long-lived secret to steal. Never give a bot org-owner or admin rights. If an automation needs to publish, give it publish rights on one package or repository, behind a protected release step. Make branch protection and required reviews apply to admins and bots too. An exemption for automation is the path an attacker takes. Keep secrets out of build artifacts, logs, images, and committed files. Inject them at run time, and run secret scanning in CI and on push, so a key that lands in a commit fails the build and gets rotated, not just deleted from the file. Git history keeps what a later commit removes.

Revocation and inventory

Revocation is not done when someone clicks revoke. It is done when a test call with the old credential fails, in every environment it was used. Keep an inventory: each token, the integration it belongs to, its scopes, its expiry, and a named owner. A token nobody owns is the one nobody rotates. Alert on token use from unexpected places: a new IP range, an unfamiliar runner, an unusual time, or a scope the integration has never used. Token scoping, workload identity, rotation, and the inventory around them are software work at the seams, and that is where we fit.

Sources

  • Public reporting on leaked and over-scoped tokens. Public reporting. October 2026.

Was this useful?

Get in touch

Seeing one of these in your system?

Describe what exists today and where it breaks. We will come back with a technical point of view and a scoped first step.