Skip to content

Commit

Permalink
#66 function build_taxonomy in cortexutils
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Jun 26, 2017
1 parent 0741221 commit e1655ba
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions contrib/cortexutils/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,22 @@ def get_param(self, name, default=None, message=None):

return self.__get_param(self.__input, name, default, message)

def build_taxonomy(self, level, namespace, predicate, value):
"""
:param level: info, safe, suspicious or malicious
:param namespace: Name of analyzer
:param predicate: Name of service
:param value: value
:return: dict
"""
return {
"level": level,
"namespace": namespace,
"predicate": predicate,
"value": value
}

def summary(self, raw):
"""Returns a summary, needed for 'short.html' template. Overwrite it for your needs!
Expand Down

0 comments on commit e1655ba

Please sign in to comment.