Skip to content
Detectors

Scanner deep dive

Overview

The Slack detector looks for token types including Slack Bot Token and Slack User Token.

How sure this page is

  • 2 details on this page were read from the source with low confidence. The maintainer view shows which.
Provider and detector details

Summary

SlackCollaborationDraft: not yet checked by a person

Slack is a messaging and work platform for teams. Apps and integrations act through tokens, such as bot, user, and app-level tokens, which can be rotated or revoked.

Website Credential docs

  • Recognizable prefix (“xoxb-” or “xoxp-” (2 more))
  • Unchanged since Sep 18, 2026
  • Source at 2325546

Runs on any connection. Triggered by keywords in the content, after decoding.How TruffleHog works

Slack tokens can be used to authenticate API requests to the Slack platform, allowing access to various workspace resources and functionalities.
TruffleHog’s own description of this detector
About Slack

team messaging platform. Products: channels, apps, bot tokens.

A verified token can call auth.test and whatever scopes the token has. Workspace admin access is unknown from the detector alone.

POST auth.test with Bearer. HTTP 200 is not sufficient; JSON ok must be true.

Provider documentation

Draft provider notes, not yet checked by a person. Not read from source.

How detection works

The Slack detector looks for possible credentials. The source names types such as Slack Bot Token and Slack User Token.

Runs by default

Matching rules and source
Keywords
  • xoxb-
  • xoxp-
  • xoxa-
  • xoxr-

Regexes

How it works

  1. Skips any text that doesn’t contain “xoxb-”, “xoxp-” or “xoxa-” (1 more). This keeps scanning fast.
  2. Looks for text matching any of its 4 patterns.
  3. Reports each remaining match as a possible Slack credential. It isn’t known to work until it’s verified.
Regular expression
One value
Guards against false matches
Not found in source
Not found in source

How it behaves

What this detector does at each step of the TruffleHog pipeline.

Keywords

Any one of these in the decoded text wakes the detector.

  • xoxb-
  • xoxp-
  • xoxa-
  • xoxr-

slack.go line 50 (opens TruffleHog source on GitHub)

Behavior

Multi-part
Yes, pairs two parts such as an ID and a secret
slack.go line 18 (opens TruffleHog source on GitHub)
Custom endpoints
No
Cloud endpoint
None
Randomness check
None in this detector's own code
False-positive check
The shared word lists

Verification. When a scan allows it, TruffleHog tests a match by calling the provider. A scan can turn this off for every detector or for this one. Atlas only describes this; it never tests credentials. How the verify decision works

Analyzer.Slack Analyzer

In short

Wakes on “xoxb-”, “xoxp-”, “xoxa-” or “xoxr-”, reads 1024 bytes around each hit to pair two parts and tests matches with the provider. A default scan runs it.

How verification works

What it means

The verification code lists slack.com as a destination. The detector decides whether a match passes using its own rules.

The detection and verification evidence on this page comes from the Open Source implementation. Check the Enterprise coverage guide for product availability.

Does checking a key change anything at the provider?

Probably not, but not certain: the source declares no changes, and many checks use POST only to read. POST can change data, so check the source if it matters.

Verification walkthrough

How it works

  1. Sends a POST to slack.com.
  2. Puts the found credential in the request: credential is sent as Authorization: Bearer ….
  3. HTTP status is not the rule. JSON ok==true is verified; invalid_auth, account_inactive, and token_revoked are not.
  4. If the request can’t reach the provider, the result is an error, not a rejection.

Evidence from source

Endpoint

https://slack.com/api/auth.test

slack.go:76 (opens TruffleHog source on GitHub)

How responses are judged

How each response status is judged
StatusOutcomeSource
json.okVerifiedPinned source package
invalid_auth/account_inactive/token_revokedNot verifiedPinned source package
Troubleshoot this check

If a result looks wrong, work through these steps. They’re built from the request and status rules above. The Atlas doesn’t send anything.

1. Send the same request yourself

No command for this check. The check sends a POST request with a body the Atlas doesn't record, so a command might get a different answer and might not be read-only.

2. Likely causes

  • The scanner couldn't reach the provider. The scanner needs outbound HTTPS access to slack.com. A firewall, proxy or DNS problem is reported as an error, not a rejection, and the key can be checked again.
  • The provider rejected the key. TruffleHog counts invalid_auth, account_inactive and token_revoked as not verified: usually a revoked, expired or mistyped key.
  • The provider changed its API. If the provider answers differently from the table above, its API may have changed since this check was written. Compare against the provider's docs.

3. Check the provider’s docs

4. Still stuck

Report it to TruffleHog

Include the status code and response you got. Never include the key.

Errors, timeouts and rate limits
Not found in source
Not found in source
If the provider can’t be reached
The result is an error, not a rejection, and the key can be checked again.

All URLs found in source

  • https://slack.com/api/auth.test
  • https://howtorotate.com/docs/tutorials/slack/
  • https://api.slack.com/methods/auth.test
  • https://slack.com/help/articles/360000446446-Manage-deactivated-members-apps-and-integrations

Verified findings

Open Source · Standard output (stdout)

The CLI prints verified findings to stdout. Use --json for structured output.

Example scan output · credential redacted

✅ Found verified result 🐷🔑
Detector Type: Slack
Decoder Type: PLAIN
Raw result: [redacted]
Terminal printer source
CI formats

With --github-actions, GitHub Actions displays this workflow command as a warning on the indicated file and line.

::warning file=config/example.env,line=8,endLine=8::Found verified Slack result 🐷🔑
GitHub Actions printer source

Legacy compatibility. --json-legacy writes pre-v3 JSON for Git, GitLab, and GitHub sources only.

Enterprise alerts

When Enterprise verifies that a secret is live, a configured notifier can alert your team. The finding is also available through the Enterprise API.

Optional analysis

What the analyzer checks

In Open Source, run trufflehog analyze separately from the scan. Enterprise runs enabled self-discovery analyzers on first discovery of a supported live secret.

Rotation resources

Use the provider’s instructions for this credential.

Rotation and revocation instructions

Slack documents OAuth token rotation for eligible bot and user tokens. Its legacy guide explains how to revoke a single OAuth token or revoke workspace app tokens by uninstalling the app.

Different credential. The tutorial rotates app configuration tokens. This detector recognizes bot, user and workspace tokens. View original tutorial

Provider documentation checked by Atlas on .

See it in the rotation directory

Token types

TruffleHog’s source looks for 4 token types, and names each one.

What the vendor says:from the vendor’s own pages. Their exact words appear only where the vendor’s licence allows it.

Token types: from TruffleHog’s source, and what the vendor says
PrefixName in sourceWhat the vendor says
xoxb-Slack Bot TokenBot tokendocs.slack.dev
Exact passageBot tokens represent a bot associated with an app installed in a workspace. … Bot token strings begin with xoxb-.Slack developer docs, "Tokens", Bot tokens. Checked 2026-11-24.Slack's API Terms don't clearly cover reuse; the owner chose to keep Slack's text on 2026-11-17.
xoxp-Slack User TokenUser tokendocs.slack.dev
Exact passageUser tokens represent workspace members. … User token strings begin with xoxp-.Slack developer docs, "Tokens", User tokens. Checked 2026-11-24.Slack's API Terms don't clearly cover reuse; the owner chose to keep Slack's text on 2026-11-17.
xoxa-Slack Workspace Access TokenNot added yet
xoxr-Slack Workspace Refresh TokenNot added yet

Formats the vendor documents that this detector may miss

Each result comes from a made-up token in the shape the vendor documents, run against this detector’s regexes at TruffleHog 2325546. Not confirmed on a real token: a real one may differ, and TruffleHog may catch it some other way.

Pages TruffleHog’s source links to (2)

Written in the detector’s source by its authors. Shown as written: this doesn’t say what each page covers.

Coverage in other scanners

4 scanners have a confirmed match.

Changes

No changes to Slack since Sep 18, 2026, when Atlas started recording.

When TruffleHog changes this detector, the changed fields, the pull request and the source diff appear here for review.

Browse all changesSource history on GitHub

Source

Facts on this page were read from trufflesecurity/trufflehog at commit 2325546.

2325546
2921dcc