@@ -61,7 +61,7 @@ class SlackSender:
6161 verified_api_tokens : Set [str ] = set ()
6262 channel_name_to_id = {}
6363
64- def __init__ (self , slack_token : str , account_id : str , cluster_name : str , signing_key : str , slack_channel : str , registry , is_preview : bool = False ):
64+ def __init__ (self , slack_token : str , account_id : str , cluster_name : str , signing_key : str , slack_channel : str , registry , is_preview : bool = False , disable_holmes_note : bool = False ):
6565 """
6666 Connect to Slack and verify that the Slack token is valid.
6767 Return True on success, False on failure
@@ -84,6 +84,7 @@ def __init__(self, slack_token: str, account_id: str, cluster_name: str, signing
8484 self .account_id = account_id
8585 self .cluster_name = cluster_name
8686 self .is_preview = is_preview
87+ self .disable_holmes_note = disable_holmes_note
8788
8889 if slack_token not in self .verified_api_tokens :
8990 try :
@@ -743,9 +744,10 @@ def __send_finding_to_slack(
743744 blocks .append (DividerBlock ())
744745
745746 is_holmes_slackbot_enabled = self .__is_holmes_slackbot_enabled ()
746- holmes_block = self .get_holmes_block (platform_enabled , is_holmes_slackbot_enabled )
747- if holmes_block :
748- blocks .append (holmes_block )
747+ if not self .disable_holmes_note :
748+ holmes_block = self .get_holmes_block (platform_enabled , is_holmes_slackbot_enabled )
749+ if holmes_block :
750+ blocks .append (holmes_block )
749751
750752
751753 if len (attachment_blocks ):
0 commit comments