Skip to content
Detectors

Scanner deep dive

Overview

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

Needs a person to check

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

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.
From the detector’s Description() in source
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

  • Regex 1Slack Bot Tokenslack.go:28 (opens TruffleHog source on GitHub)Only code file

    xoxb\-[0-9]{10,13}\-[0-9]{10,13}[a-zA-Z0-9\-]*
    Show as a diagram
  • Regex 2Slack User Tokenslack.go:29 (opens TruffleHog source on GitHub)Only code file

    xoxp\-[0-9]{10,13}\-[0-9]{10,13}[a-zA-Z0-9\-]*
    Show as a diagram
  • Regex 3Slack Workspace Access Tokenslack.go:30 (opens TruffleHog source on GitHub)Only code file

    xoxa\-[0-9]{10,13}\-[0-9]{10,13}[a-zA-Z0-9\-]*
    Show as a diagram
  • Regex 4Slack Workspace Refresh Tokenslack.go:31 (opens TruffleHog source on GitHub)Only code file

    xoxr\-[0-9]{10,13}\-[0-9]{10,13}[a-zA-Z0-9\-]*
    Show as a diagram

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.
MustCompile
One value
Guards against false matches
Not found in source
Not found in source
  • team
  • name

How it behaves

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

pkg/detectors/slack · Scanner

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

Sends POST to slack.com; json.ok means verified, invalid_auth, account_inactive, token_revoked means not verified.

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.

Source says: POST of Slack auth.test; mutating side effects not declared

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_revokedinvalid_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.

Rule: not-get. Key placement as recorded: Bearer token.

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
SetVerificationError

HTTP status is not the rule. JSON ok==true is verified; invalid_auth, account_inactive, and token_revoked are not.

transport errors return a verification error

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.

pkg/analyzer/cli.go registers this detector key to the analyzer package.

How it works

  1. Runs after the detector reports the match as verified.
  2. Evaluates what the credential may be able to access using the analyzer’s own checks or rules.
  3. Reports what it finds. Its source lists 331 permissions in 1 group.

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

Every fact on this page was parsed from trufflesecurity/trufflehog at 2325546, unless a row below says otherwise.

2325546
2921dcc
Parser
trufflehog-detectors-analyzers-v12
Extraction
intel-detector-v7

7 of 22 evidence rows need attention

Evidence rows that need attention
FieldStatusValueSource
lastSeenAt2026-11-25T16:33:44.855ZNo citation
verify.httpMethodsNone extractedFile
verify.statusCodesNone extractedFile
timeoutNone extractedFile
rateLimitNone extractedFile
verification.expectedStatuses.verified{"statuses":[],"names":["json.ok"],"outcome":"verified"}Parser confidence: mediumFile
verification.expectedStatuses.not_verified{"statuses":[],"names":["invalid_auth","account_inactive","token_revoked"],"outcome":"not_verified"}Parser confidence: mediumFile
All 22 evidence rows
All evidence rows
FieldStatusValueSource
descriptionSlack tokens can be used to authenticate API requests to the Slack platform, allowing access to various workspace resources and functionalities.File
keywordsxoxb-, xoxp-, xoxa-, xoxr-File
detectorTypesSlackFile
filesslack.goFile
patternsxoxb\-[0-9]{10,13}\-[0-9]{10,13}[a-zA-Z0-9\-]*, xoxp\-[0-9]{10,13}\-[0-9]{10,13}[a-zA-Z0-9\-]*, xoxa\-[0-9]{10,13}\-[0-9]{10,13}[a-zA-Z0-9\-]*, xoxr\-[0-9]{10,13}\-[0-9]{10,13}[a-zA-Z0-9\-]*File
patternTypemust_compileFile
statusactiveFile
lastSeenAt2026-11-25T16:33:44.855ZNo citation
rotationGuidehttps://howtorotate.com/docs/tutorials/slack/File
verify.hasVerifyYesFile
verify.httpMethodsNone extractedFile
verify.statusCodesNone extractedFile
timeoutNone extractedFile
rateLimitNone extractedFile
errorHandlingSetVerificationErrorFile
verify.urlshttps://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-integrationsFile
detection.keywordsxoxb-, xoxp-, xoxa-, xoxr-Lines 49–49
verification.endpointhttps://slack.com/api/auth.testLines 76–76
verification.httpMethodPOSTLines 76–76
verification.authenticationMethodBearer tokenLines 82–82
verification.expectedStatuses.verified{"statuses":[],"names":["json.ok"],"outcome":"verified"}Parser confidence: mediumFile
verification.expectedStatuses.not_verified{"statuses":[],"names":["invalid_auth","account_inactive","token_revoked"],"outcome":"not_verified"}Parser confidence: mediumFile
Parser completeness
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Unknown
  • Field status: Unknown
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Not scanned
Package files (1)
  • slack.go