diff --git a/detect_secrets/pre_commit_hook.py b/detect_secrets/pre_commit_hook.py index 0543f02cc..22ad4da7c 100644 --- a/detect_secrets/pre_commit_hook.py +++ b/detect_secrets/pre_commit_hook.py @@ -1,6 +1,7 @@ from __future__ import absolute_import from __future__ import unicode_literals +import os import subprocess import sys import textwrap @@ -205,9 +206,15 @@ def _print_secrets_found(secrets): def _print_mitigation_suggestions(): + security_team = os.environ.get( + 'DETECT_SECRETS_SECURITY_TEAM', + 'in #security', + ) suggestions = [ - 'For information about putting your secrets in a safer place, please ask in #security', - 'Mark false positives with an inline `pragma: allowlist secret` comment', + 'For information about putting your secrets in a safer place, ' + + 'please ask ' + security_team, + 'Mark false positives with an inline ' + + '`pragma: allowlist secret` comment', 'Commit with `--no-verify` if this is a one-time false positive', ]