From fc82b20206be32e5e59fc1c6e539ca9d792a54ee Mon Sep 17 00:00:00 2001 From: brunotoresan-axur Date: Tue, 15 Aug 2023 18:23:41 -0300 Subject: [PATCH] informing platform in taxonomy.predicate --- analyzers/Axur/axur_analyzer.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/analyzers/Axur/axur_analyzer.py b/analyzers/Axur/axur_analyzer.py index f1f4160f5..97ea63672 100644 --- a/analyzers/Axur/axur_analyzer.py +++ b/analyzers/Axur/axur_analyzer.py @@ -36,12 +36,18 @@ def summary(self, raw): for data in raw['results']: level = levels[data.get('score', 0)] + predicate = createPredicateFrom(data) taxonomies.append( - self.build_taxonomy(level, 'Axur', data['source'], data.get('hits', 0)) + self.build_taxonomy(level, 'Axur', predicate, data.get('hits', 0)) ) return {'taxonomies': taxonomies} + def createPredicateFrom(data): + if len(data['context']) > 0 and 'platform' in data['context'][0].keys(): + return data['source'] + ":" + data['context']['platform'] + else: + return data['source'] if __name__ == '__main__': AxurAnalyzer().run()