Add Slack token detector#122
Merged
Merged
Conversation
Add Slack token detector
domanchi
approved these changes
Feb 1, 2019
KevinHock
approved these changes
Feb 1, 2019
| class SlackDetector(RegexBasedDetector): | ||
| secret_type = 'Slack Token' | ||
| blacklist = ( | ||
| re.compile(r'xox(?:a|b|p|o|s|r)-(?:\d+-)+[a-z0-9]+', flags=re.IGNORECASE), |
Collaborator
There was a problem hiding this comment.
Super nit: We could add length ranges but I couldn't find out how much they vary, e.g. the last field might not be more than 32 chars. I rather we lean towards false-positives and iterate though, i.e. ship as-is 👍 (not that I think there will be any false-positives, since xox is sort of rare)
cc @dxa4481, in case you want to compare with your truffleHogRegex
| PluginDescriptor( | ||
| classname='SlackDetector', | ||
| disable_flag_text='--no-slack-scan', | ||
| disable_help_text='Disables scanning for secret slack.', |
Collaborator
There was a problem hiding this comment.
Nit: Maybe Disables scanning for Slack tokens.
jfagoagas
pushed a commit
to jfagoagas/detect-secrets
that referenced
this pull request
Mar 14, 2026
Sign container images with cosign
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Slack token detector.
CC @jribm