A Pulumi access token lets whoever holds it work with Pulumi Cloud as the account or team that created it. That usually means reading and updating the state of your infrastructure stacks, and running deployments that create, change or delete real resources. Pulumi state often records resource names, endpoints and sometimes sensitive outputs, so the token is a map of your infrastructure as well as a control key. Revoke the token first, then check what it touched.
Check your GitHub account for leaked secrets — free
- Provider
- Pulumi
- Severity
- High
- Impact
- Cloud infrastructure access
- Checked live by LeakWatch
- No
What a Pulumi API Token looks like
A Pulumi access token starts with pul- followed by 40 lowercase hexadecimal characters, which are the digits 0 to 9 and the letters a to f. The masked shape looks like this:
pul-…XXXX Pulumi access token (masked)
The value is only shown once, when it is created. A token printed in a log or pasted into a file is therefore a copy of a value that you cannot look up again, which is one more reason to revoke rather than try to recover it. Pulumi has personal tokens, tied to one user, and organization or team tokens, tied to a shared scope. Personal tokens act with the permissions of their owner, while organization and team tokens act with the permissions given to them. Find out which kind leaked before you decide how far the damage reaches.
How Pulumi API Tokens get leaked
- Environment files committed by accident. A
PULUMI_ACCESS_TOKEN=line in a.envfile, a Docker Compose file or a shell profile that was checked into a repository. - CI configuration. A token written into a pipeline definition as plain text instead of a secret reference, so it sits in the repository and in every fork.
- Build logs. A deploy step that prints its environment, or a verbose flag that echoes the arguments of the Pulumi CLI.
- Local backups and snippets. A copy saved in a notes file, a shared gist or a support thread while someone was debugging a deployment.
- Example projects. A tutorial or starter repository that was published with a real token by mistake, then reused by others.
What to do in the first hour
- Delete the exposed token first. In Pulumi Cloud, open your personal access tokens and delete the one that leaked. Deleting a token revokes its access immediately, so do it before you clean anything else.
- Create a replacement for the pipelines or people that depended on it. Give it an expiry date, and prefer an organization or team token scoped to what the job needs over a personal token that can do everything its owner can.
- Deploy the replacement to the CI system or the machine that runs
pulumi up, then run a preview to confirm it can still read the stacks it needs. - Check the stack history. Review the update history of each stack for the period since the exposure. Look for deployments you did not start, resources created in regions you do not use, and changes to access, IAM roles or security groups. Pulumi keeps a record of updates, so compare it with what your pipelines expected to run.
- Rotate the cloud credentials the stacks use. A Pulumi token does not reveal provider keys, but a token with deploy rights can change the infrastructure those keys control. If an attacker made a change, rotate the keys that the change could have exposed, such as service account keys, database passwords and secrets in the stack configuration.
- Review stack secrets. Stack configuration can contain encrypted secrets. Check whether the passphrase or the key used to encrypt them was stored in the same repository, and rotate it if so.
- Clean the repository and look for other credentials next to the token. See I accidentally pushed an API key to GitHub and Deep scan your whole git history.
Not sure what else leaked? Run a free scan.
Revoke it at Pulumi
Personal access tokens are listed under your user menu in Pulumi Cloud. Open the list, find the token by its description or creation date, and delete it from the menu at the end of its row. Organization and team tokens are managed from the settings of the organization or team that owns them, so if the leaked value was one of those, revoke it there. Pulumi’s documentation describes these steps in more detail, and the interface may change, so if a menu differs, look for the access token section of your account or organization settings and follow Pulumi’s current guidance.
How LeakWatch detects it
The rule is called Pulumi API Token. It looks for the literal prefix pul- followed by exactly 40 lowercase hexadecimal characters, with a word boundary before it and a boundary after the value, such as a quote, a space, a semicolon or the end of the line. A value that is shorter or longer than 40 characters is not reported. The severity is high. This type is not checked live: LeakWatch does not send any request to Pulumi with the token it found, so the detection is the only signal, and you should revoke the token yourself.
LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.
FAQ
Can someone change my infrastructure with this token?
Yes, if the token’s owner or team can deploy the stacks. A deploy can create, change and delete resources, so the first step is to revoke the token and then check the update history of each stack.
The token was only visible for a few minutes. Is that enough to ignore it?
No. Scrapers copy public commits within minutes, and a copy outside your control cannot be removed. Revoke first, then review the history to see whether anything happened.
Does deleting the token also rotate my cloud keys?
No. Deleting the token only ends its access to Pulumi Cloud. Any provider keys that your stacks use are separate credentials, and you should rotate them if there is a chance they were exposed through state, configuration or a changed deployment.