Scanner deep dive
Overview
The Slack detector looks for token types including Slack Bot Token and Slack User Token.
Needs a person to check
- verification.expectedStatuses.verified needs review — The parser marked this value as inferred or low confidence.
- verification.expectedStatuses.not_verified needs review — The parser marked this value as inferred or low confidence.
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.
- Recognizable prefix (“xoxb-” or “xoxp-” (2 more))
- Unchanged since Sep 18, 2026(log start)
- Source at 2325546
- 2 review items
- Change review: Nothing queued
- Default scan: Runs in a default scan
- pkg/detectors/slack
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.
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 documentationDraft 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.
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
- Skips any text that doesn’t contain “xoxb-”, “xoxp-” or “xoxa-” (1 more). This keeps scanning fast.
- Looks for text matching any of its 4 patterns.
- 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-
Behavior
- Multi-part
- Yes, pairs two parts such as an ID and a secret
- slack.go line 18 (opens TruffleHog source on GitHub)
- Match window
- 1024 bytes on each side of a keyword
- multi_part_credential_provider.go line 13 (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
- Sends a POST to slack.com.
- Puts the found credential in the request: credential is sent as Authorization: Bearer ….
- HTTP status is not the rule. JSON ok==true is verified; invalid_auth, account_inactive, and token_revoked are not.
- If the request can’t reach the provider, the result is an error, not a rejection.
Evidence from source
How responses are judged
| Status | Outcome | Source |
|---|---|---|
| json.ok | Verified | Pinned source package |
| invalid_auth/ | Not verified | Pinned 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
- Provider documentation Atlas provider entry, draft
- docs.slack.dev: admin from the Slack analyzer notes
- docs.slack.dev: admin.analytics.read from the Slack analyzer notes
- docs.slack.dev: admin.analytics.getfile from the Slack analyzer notes
4. Still stuck
Report it to TruffleHogInclude 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 sourceCI 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 sourceLegacy 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.
- Open Slack Analyzer →
- Reads from provider
Reads the X-Oauth-Scopes response header.
Permissions and sources
331 permission names in source
Alert delivery has no documented ordering relative to analysis. How Analyze runs.
pkg/analyzer/cli.go registers this detector key to the analyzer package.
How it works
- Runs after the detector reports the match as verified.
- Evaluates what the credential may be able to access using the analyzer’s own checks or rules.
- 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.
- Rotate Slack OAuth tokens (external site)https://docs.slack.dev/authentication/using-token-rotation/Rotation instructions · Found by Atlas
- Revoke legacy Slack tokens (external site)https://docs.slack.dev/legacy/legacy-authentication/Revocation instructions · Found by Atlas
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 .
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.
| Prefix | Name in source | What the vendor says |
|---|---|---|
| xoxb- | Slack Bot Token | Bot 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 Token | User 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 Token | Not added yet |
| xoxr- | Slack Workspace Refresh Token | Not added yet |
Formats the vendor documents that this detector may miss
xoxe.xoxb-1-…Rotated bot token (expires after 12 hours)Not matcheddocs.slack.devxoxe.xoxp-1-…Rotated user token (expires after 12 hours)Not matcheddocs.slack.devxoxe-1-…Refresh token (mints new access tokens; single use)Not matcheddocs.slack.devxapp-…App-level tokenNot matcheddocs.slack.devxoxe.xapp-1-…Rotated app-level tokenNot matcheddocs.slack.dev
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.
BetterleaksConfirmed match
GitHub Secret ProtectionConfirmed match
- Slack API Token
slack_api_tokenPush protection yes · Validity check yes
- Slack API Token
GitleaksConfirmed match
KingfisherConfirmed match
betterleaks.slack-bot-tokenThe rule declares validation, revocation.betterleaks.slack-legacy-workspace-tokenThe rule declares revocation.betterleaks.slack-user-tokenThe rule declares validation, revocation.
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.
Source
Every fact on this page was parsed from trufflesecurity/trufflehog at 2325546, unless a row below says otherwise.
- Source file
- pkg/detectors/slack/slack.go
- Parser
- trufflehog-detectors-analyzers-v12
- Extraction
- intel-detector-v7
7 of 22 evidence rows need attention
| Field | Status | Value | Source |
|---|---|---|---|
| lastSeenAt | 2026-11-25T16:33:44.855Z | No citation | |
| verify.httpMethods | None extracted | File | |
| verify.statusCodes | None extracted | File | |
| timeout | None extracted | File | |
| rateLimit | None extracted | File | |
| verification.expectedStatuses.verified | {"statuses":[],"names":["json.ok"],"outcome":"verified"}Parser confidence: medium | File | |
| verification.expectedStatuses.not_verified | {"statuses":[],"names":["invalid_auth","account_inactive","token_revoked"],"outcome":"not_verified"}Parser confidence: medium | File |
All 22 evidence rows
| Field | Status | Value | Source |
|---|---|---|---|
| description | Slack tokens can be used to authenticate API requests to the Slack platform, allowing access to various workspace resources and functionalities. | File | |
| keywords | xoxb-, xoxp-, xoxa-, xoxr- | File | |
| detectorTypes | Slack | File | |
| files | slack.go | File | |
| patterns | xoxb\-[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 | |
| patternType | must_compile | File | |
| status | active | File | |
| lastSeenAt | 2026-11-25T16:33:44.855Z | No citation | |
| rotationGuide | https://howtorotate.com/docs/tutorials/slack/ | File | |
| verify.hasVerify | Yes | File | |
| verify.httpMethods | None extracted | File | |
| verify.statusCodes | None extracted | File | |
| timeout | None extracted | File | |
| rateLimit | None extracted | File | |
| errorHandling | SetVerificationError | File | |
| verify.urls | 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 | File | |
| detection.keywords | xoxb-, xoxp-, xoxa-, xoxr- | Lines 49–49 | |
| verification.endpoint | https://slack.com/api/auth.test | Lines 76–76 | |
| verification.httpMethod | POST | Lines 76–76 | |
| verification.authenticationMethod | Bearer token | Lines 82–82 | |
| verification.expectedStatuses.verified | {"statuses":[],"names":["json.ok"],"outcome":"verified"}Parser confidence: medium | File | |
| verification.expectedStatuses.not_verified | {"statuses":[],"names":["invalid_auth","account_inactive","token_revoked"],"outcome":"not_verified"}Parser confidence: medium | File |
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