Skip to content

Commit

Permalink
#64 #119 improved summary to use taxonomies. Use assessment in short …
Browse files Browse the repository at this point in the history
…report to report the maliciousness
  • Loading branch information
jeromeleonard committed Jan 3, 2018
1 parent c941ac7 commit 68b6e7b
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions analyzers/C1fApp/cifquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,21 @@ def c1f_query(self, data):

return results

@staticmethod
def summary(raw):
return {
"count": raw["count"]
}
def summary(self, raw):
taxonomies = []
level = "info"
namespace = "C1fApp"
predicate = "Assessment"
for a in raw["assessment"]:
if a in ["whitelist"]:
level = "safe"
elif a in ["suspicious"]:
level = "suspicious"
elif a in ["phishing", "malware", "botnet"]:
level = "malicious"
value = "\"{}\"".format(a)
taxonomies.append(self.build_taxonomy(level, namespace, predicate, value))
return {"taxonomies": taxonomies}

def run(self):

Expand Down

0 comments on commit 68b6e7b

Please sign in to comment.