diff --git a/detect_secrets/plugins/slack.py b/detect_secrets/plugins/slack.py index 80dab5fbb..81bab0c2c 100644 --- a/detect_secrets/plugins/slack.py +++ b/detect_secrets/plugins/slack.py @@ -18,7 +18,7 @@ class SlackDetector(RegexBasedDetector): denylist = ( # Slack Token - re.compile(r'xox(?:a|b|p|o|s|r)-(?:\d+-)+[a-z0-9]+', flags=re.IGNORECASE), + re.compile(r'(xwfp|xapp|xox(?:a|b|c|p|o|s|r))-(?:\d+-)+[a-z0-9]+', flags=re.IGNORECASE), # Slack Webhooks re.compile( r'https://hooks\.slack\.com/services/T[a-zA-Z0-9_]+/B[a-zA-Z0-9_]+/[a-zA-Z0-9_]+', diff --git a/tests/plugins/slack_test.py b/tests/plugins/slack_test.py index a242c9ef2..4aed6c7ba 100644 --- a/tests/plugins/slack_test.py +++ b/tests/plugins/slack_test.py @@ -29,6 +29,15 @@ class TestSlackDetector: ( 'xoxb-34532454-e039d02840a0b9379c' ), + ( + 'xoxc-1111111111-111111111111-1111111111111-11111111111111111' + ), + ( + 'xwfp-523423-234243-234233-e039d02840a0b9379c' + ), + ( + 'xapp-523423-234243-234233-e039d02840a0b9379c' + ), ( 'https://hooks.slack.com/services/Txxxxxxxx/Bxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx' ),