diff --git a/src/n0s1/controllers/slack_controller.py b/src/n0s1/controllers/slack_controller.py index 44e7c91..cd8cde1 100644 --- a/src/n0s1/controllers/slack_controller.py +++ b/src/n0s1/controllers/slack_controller.py @@ -78,7 +78,8 @@ def post_comment(self, issue, comment): response = self._client.chat_postMessage( channel=channel_id, text=comment, - thread_ts=thread_ts + thread_ts=thread_ts, + unfurl_links=False ) self.log_message(f"Message sent successfully") diff --git a/src/n0s1/n0s1.py b/src/n0s1/n0s1.py index 46fb3c8..d08d9b8 100755 --- a/src/n0s1/n0s1.py +++ b/src/n0s1/n0s1.py @@ -395,6 +395,9 @@ def report_leaked_secret(scan_text_result, controller): comment_template += f"\n{variable}: {{{variable}}}" comment = comment_template.format(finding_info=finding_info, bot_name=bot_name, secret_manager=secret_manager, contact_help=contact_help, label=label) + if controller.get_name().lower() == "Slack".lower(): + comment = comment + f"\nLeak source: {url}" + return controller.post_comment(issue_id, comment) return True