Skip to content

Commit

Permalink
Not every company has a #security channel in slack/irc
Browse files Browse the repository at this point in the history
For us, in @alphagov, our #security channel is for physical security questions and our cyber security team hang out in #cybersecurity.

This seems like the simplest way to get the message changed, working even for people who don't - or can't - use a config.

My edits formatted with [black](https://github.com/psf/black)
For example
  • Loading branch information
0atman authored Mar 9, 2020
1 parent 2b92ed6 commit 52758fc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 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,12 +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',
'Commit with `--no-verify` if this is a one-time false positive',
"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",
]


wrapper = textwrap.TextWrapper(
initial_indent=' - ',
subsequent_indent=' ',
Expand Down

0 comments on commit 52758fc

Please sign in to comment.