Skip to content

Commit

Permalink
Add run_all_insights to analyze message function (#36)
Browse files Browse the repository at this point in the history
* feat: add run_all_insights to analyze message function

* chore: version bump

---------

Co-authored-by: Andrew Kline <[email protected]>
  • Loading branch information
andrew-kline and Andrew Kline authored Jun 12, 2024
1 parent b1b6de8 commit bdc9431
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def read(fname):

setup(
name="sublime-cli",
version="0.0.30",
version="0.0.31",
description="Abstraction to interact with the Sublime API.",
url="https://sublimesecurity.com/",
author="Sublime Security",
Expand Down
5 changes: 4 additions & 1 deletion src/sublime/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def create_message(self, raw_message, mailbox_email_address=None, message_type=N
response, _ = self._request(endpoint, request_type='POST', json=body)
return response

def analyze_message(self, raw_message, rules, queries, run_all_detection_rules=False, run_active_detection_rules=False):
def analyze_message(self, raw_message, rules, queries, run_all_detection_rules=False, run_active_detection_rules=False, run_all_insights=False):
"""Analyze a Message Data Model against a list of rules or queries.
:param raw_message: Base64 encoded raw message
Expand All @@ -211,6 +211,8 @@ def analyze_message(self, raw_message, rules, queries, run_all_detection_rules=F
:type run_all_detection_rules: bool
:param run_active_detection_rules: whether to run active detection rules against the given message
:type run_active_detection_rules: bool
:param run_all_insights: whether to run all insight queries against the given message
:type run_all_insights: bool
"""

Expand All @@ -222,6 +224,7 @@ def analyze_message(self, raw_message, rules, queries, run_all_detection_rules=F
"queries": queries,
"run_all_detection_rules": run_all_detection_rules,
"run_active_detection_rules": run_active_detection_rules,
"run_all_insights": run_all_insights,
}

endpoint = self._EP_MESSAGES_ANALYZE
Expand Down

0 comments on commit bdc9431

Please sign in to comment.