Skip to content

Commit

Permalink
Possibility to use a Yeti apikey.
Browse files Browse the repository at this point in the history
Optionally, we can provide a yeti apy_key. If so, we wolud need to modify the Yeti.json accordingly
  • Loading branch information
siisar committed Apr 26, 2019
1 parent 8dae6a8 commit d0f4f53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion analyzers/Yeti/yeti.py
Expand Up @@ -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', []))
Expand All @@ -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:
Expand Down

0 comments on commit d0f4f53

Please sign in to comment.