From d0f4f5352b84de94463e1959481ec3013cb3c35f Mon Sep 17 00:00:00 2001 From: siisar <49953844+siisar@users.noreply.github.com> Date: Fri, 26 Apr 2019 13:04:06 +0200 Subject: [PATCH] Possibility to use a Yeti apikey. Optionally, we can provide a yeti apy_key. If so, we wolud need to modify the Yeti.json accordingly --- analyzers/Yeti/yeti.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/analyzers/Yeti/yeti.py b/analyzers/Yeti/yeti.py index bddcbc4aa..252b01fb8 100755 --- a/analyzers/Yeti/yeti.py +++ b/analyzers/Yeti/yeti.py @@ -9,6 +9,7 @@ class YetiAnalyzer(Analyzer): def __init__(self): Analyzer.__init__(self) self.url = self.get_param('config.url', None, 'Missing URL for Yeti API') + self.api_key = self.get_param('config.api_key') def summary(self, raw): count = len(raw.get('findings', [])) @@ -25,7 +26,7 @@ def summary(self, raw): return result def run(self): - api = pyeti.YetiApi("{}/api/".format(self.url)) + api = pyeti.YetiApi("{}/api/".format(self.url), api_key=self.api_key) data = self.get_data() try: