# Leaked Snowflake Access Token? Revoke It Fast

> Snowflake programmatic access token leaked? Remove it with ALTER USER, check query history and rotate credentials. Step-by-step guide for data teams.

Source: https://leakwatch.net/secrets/snowflake-programmatic-access-token

---

[LeakWatch](/)

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

1.  [Home](/)
2.  [Secrets](/secrets)
3.  Snowflake Programmatic Access Token

Databases & keys · Secret guide

# Leaked Snowflake Programmatic Access Token: what to do in the first hour

Critical severityDetected onlyLast verified November 5, 2026 · 5 min read

A Snowflake programmatic access token, often called a PAT, lets a client sign in to a Snowflake account as a particular user without that user’s password. It is meant for scripts, pipelines and service integrations. Whoever holds the token can run queries with the permissions of that user, which in a data warehouse often means reading large amounts of customer, finance or product data. Remove the token first, then look at what it was used to query.

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

Provider

Snowflake

Severity

Critical

Impact

Payments and customer data

Checked live by LeakWatch

No

## What a Snowflake Programmatic Access Token looks like

Snowflake does not give these tokens a short fixed prefix that you can match at a glance. The value is a long string of letters, digits, underscores and hyphens, usually over a hundred characters, and it is generated for one user and one named token. It is often stored under a variable with a name such as a Snowflake token setting or a short `sf_token` label:

```text
SNOWFLAKE_TOKEN=<long token value, masked as …XXXX>
```

Because the value has no recognizable prefix, the only reliable clue is where it sits. A token in a Snowflake connection file, a Python or Node.js script, a dbt profile or a CI variable is a live credential until you confirm it has been removed. A user can hold several tokens at once, each with its own name, so a file may contain one of several.

## How Snowflake tokens get leaked

-   **Connection files committed to a repository.** A profile file for a data tool, such as a dbt profile or a connector configuration, saved with the token inside.
-   **Notebooks.** A token typed into a notebook cell to connect quickly, then saved with the notebook when it is shared.
-   **Pipeline logs.** An ingestion job that prints its connection settings when it fails, so the log stores the token.
-   **Shared scripts.** A snippet posted to a forum or a support thread to show how to connect, with the real token left in.
-   **Laptop backups.** A copy of a developer’s home folder synced to a personal cloud drive or a shared network share.

## What to do in the first hour

1.  **Remove the token in Snowflake.** Connect as the owner of the token, or ask an administrator, and run the statement that removes the named programmatic access token from the user. This takes effect at once, and a removed token cannot be restored, so you will need to create a new one. Do this before you clean anything else.
2.  **Create a replacement** under a narrower role, and store it in a secret manager or a CI variable. Give each integration its own token, so the next removal affects only one job.
3.  **Check the query history.** Open the query history for the account, and filter to the user and the period since the token may have been exposed. Look for queries you do not recognize, for large exports, for access to tables the job never reads, and for logins from addresses you do not know.
4.  **Check the login history** for the same user and for any other user that the token could have changed. Review grants and roles that changed recently.
5.  **Review the role.** A token should be tied to a role with only the privileges the job needs. Remove grants on sensitive schemas that the integration does not read.
6.  **Clean the repository** after the rotation: remove the value from the files, add the file to `.gitignore`, and decide whether to rewrite history. Old clones still contain the value.

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

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

## Revoke it at Snowflake

Snowflake’s own reference covers removal through SQL. The statement is `ALTER USER` with the `REMOVE PROGRAMMATIC ACCESS TOKEN` clause, which names the token to remove. The full syntax is in [Snowflake’s documentation](https://docs.snowflake.com/en/sql-reference/sql/alter-user-remove-programmatic-access-token). Removing a token for another person requires a privilege on that user, so you may need an administrator to run it. The same token can also be managed from the profile settings in Snowsight, Snowflake’s web interface. A token that was removed cannot be recovered. You can reach the user settings from the account settings, but the statement above is the reliable route.

## How LeakWatch detects it

The rule is called Snowflake Programmatic Access Token. It looks for a phrase that names a Snowflake token, such as a variable with `snowflake` and `token` in its name or a `sf_token` label, followed by a separator such as an equals sign or a colon, and then a value of between 100 and 500 letters, digits, underscores and hyphens. The label must sit close to the value, so a long random string with no Snowflake context is not reported. The severity is **critical**, with the impact class for payment data. **This type is not checked live**: LeakWatch does not try the token against Snowflake.

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

Is a token in a private repository still a risk?

Yes, to a lower degree. Everyone with repository access, every clone and every pipeline log can read the value. Treat it as exposed if the repository was ever public, forked or shared with contractors.

Will removing the token break my pipeline?

It will stop any job that still uses it. Create the replacement, update the job and confirm it runs before you remove the old token if you can. If the leak is active, remove it first and accept a short failure.

Does a password reset fix this?

Not by itself. A token is separate from the user’s password, so you need to remove the token explicitly. If the user also signed in with a password that was stored in the same file, rotate that password as well.

## Related

-   [Databricks API Token](/secrets/databricks-api-token)
-   [PlanetScale API Token](/secrets/planetscale-api-token)
-   [Database Connection String](/secrets/database-connection-string)
-   [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 Snowflake.

![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)
