# Leaked Infracost API Token? Revoke It and Check Runs

> Infracost API token leaked in CI or config? Revoke it in account settings, log in again and review recent runs and projects. Step-by-step guide.

Source: https://leakwatch.net/secrets/infracost-api-token

---

[LeakWatch](/)

[Product](/product)[Live feed](/leaks)[Guides](/secrets)[Blog](/blog)[Free scan](/)

1.  [Home](/)
2.  [Secrets](/secrets)
3.  Infracost API Token

Cloud · Secret guide

# Leaked Infracost API Token: what to do in the first hour

High severityDetected onlyLast verified November 5, 2026 · 4 min read

An Infracost API token links the Infracost command-line tool and its service to your organization. It lets whoever holds it run cost estimates against your infrastructure definitions and read the cost data the service stores for your projects. It does not grant access to your cloud accounts, so it cannot start or stop resources. The risk is narrower than a cloud key, but cost and pricing data can still reveal your architecture, your usage patterns and your spend, and a token can be used to fill your account with requests.

[Check your GitHub account for leaked secrets — free](/)

Provider

Infracost

Severity

High

Impact

SaaS account access and billing

Checked live by LeakWatch

No

## What an Infracost API Token looks like

Infracost API tokens start with `ico-`, followed by 32 letters and digits. The whole token is a single string with no spaces:

```text
ico-…   Infracost API token (masked)
```

The prefix is distinctive, so the value can be found without any surrounding context. Developers usually meet it in one of two places: a configuration file written by the command-line login, or an environment variable used by a CI job. The token is stored on the machine after login, which means a copied home directory or a shared build image can carry it to places you did not intend.

## How Infracost API Tokens get leaked

-   **Developer configuration.** The token stored after the command-line login, copied in a dotfiles repository or a backup.
-   **CI and build configuration.** A pipeline file that sets the token as a plain value rather than a secret reference.
-   **Docker images.** A build that copies the configuration directory into an image that is later pushed to a public registry.
-   **Shared scripts.** A cost-estimate script sent to a colleague or posted in an issue with the token left in.
-   **Logs.** A CI job that prints its environment variables while debugging a failed cost check.

## What to do in the first hour

1.  **Revoke the token.** Open the account settings for your Infracost organization and revoke the API key that leaked. Do this before you update any code.
2.  **Create a new key** for the CI job or developer who needs it. Store the value in your CI secret store, and log in again on developer machines that used the old one.
3.  **Check the usage.** Look at the recent runs in the Infracost dashboard for the organization. Unexpected runs at unusual hours, or from unknown projects, are the signs to watch.
4.  **Review projects.** Check that no project was added or changed without your knowledge, and remove any you do not recognize.
5.  **Look at the rest of the environment.** A CI job that held the token probably held cloud credentials too. Review those and rotate any that sat beside it. See [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github) for the order of steps.
6.  **Clean the repository.** Remove the token from the configuration files, and make sure local configuration directories are excluded from version control and image builds.

Not sure what else leaked? [Run a free scan](/).

[Not sure what else leaked? Run a free scan.](/)

## Revoke it at Infracost

API keys are shown in the account settings of your Infracost organization. Open account settings, find the key that leaked, and revoke it. Then create the replacement and log in again wherever the old key was stored. We have not confirmed the exact menu wording or where the key is listed for each organization type, so follow the labels on the page you are shown, and check that you are in the correct organization.

## How LeakWatch detects it

The rule is called Infracost API Token. It looks for the `ico-` prefix followed by exactly 32 letters and digits, with a word boundary or a line break after it. Shorter or longer values, and values without that prefix, are not reported. The severity is **high**, with the impact class for SaaS tools. This type is not checked live: LeakWatch does not send a request to Infracost with the value it found.

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 the token be used to change my cloud resources?

Not directly. Infracost estimates costs from configuration files and reads its own stored data. The risk is that an attacker can see your architecture and usage, and can run requests against your account.

Is it enough to log out on my laptop?

No. Logging out on one machine does not revoke the key. Revoke the key in the account settings, which stops it working everywhere.

Should I use one key for the whole team?

Better to use one key per CI job or per person. Then a leak affects one place, and the audit trail shows who did what.

## Related

-   [Terraform Cloud API Token](/secrets/terraform-cloud-api-token)
-   [Pulumi API Token](/secrets/pulumi-access-token)
-   [Scalingo API Token](/secrets/scalingo-api-token)
-   [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github)
-   [Which vendors leak most this week](/leaks/trends)
-   [All secret guides](/secrets)

[Get alerted next time a secret leaks — create a free account](/)

LeakWatch is not affiliated with Infracost.

![Gabriel Diyan, founder of LeakWatch](/brand/Photo-Gabriel-Diyan.webp)

Gabriel Diyan (0xCr0c0)

Cybersecurity student, founder of LeakWatch. I built and run the scanner described here — the detection patterns, the false-positive classifier and the provider validators are mine. [More about who I am](/about).

[GitHub](https://github.com/Leakwatch-Scan) · [X](https://x.com/LeakwatchScan) · [LinkedIn](https://www.linkedin.com/in/gabriel-diyan-80a378375) · [GitHub (personal)](https://github.com/crocogab)

LeakWatch

Secrets leak into public commits every minute. This watches the forges for yours. Built and run by [Gabriel Diyan](/about), a cybersecurity student — [why LeakWatch exists](/about).

Scan

-   [Product](/product)
-   [Live feed](/leaks)
-   [Trends](/leaks/trends)
-   [API docs](/docs)
-   [CI/CD](/docs?tab=ci)

Read

-   [Blog](/blog)
-   [Secret guides](/secrets)
-   [Changelog](/changelog)
-   [About](/about)

Verify

-   [Security](/security)
-   [Privacy](/privacy)
-   [Terms](/terms)
-   [Legal](/legal)
-   [Contact](/contact)
-   [Status](https://status.leakwatch.net)

© 2026 LeakWatch

[GitHub](https://github.com/Leakwatch-Scan)[X](https://x.com/LeakwatchScan)
