Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not every company has a #security channel in slack/irc #283

Merged
merged 5 commits into from
Mar 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions detect_secrets/pre_commit_hook.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import absolute_import
from __future__ import unicode_literals

import os
import subprocess
import sys
import textwrap
Expand Down Expand Up @@ -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',
]

Expand Down