Support tenable API keys (#176)

* support tenable API keys

* more flexible config support

* add nessus API key support

* fix whitespace
This commit is contained in:
pemontto
2019-05-02 09:26:51 +01:00
committed by Quim Montal
parent 162636e60f
commit 6cf2a94431
7 changed files with 103 additions and 72 deletions

View File

@ -31,7 +31,7 @@ class vwConfig(object):
for section in self.config.sections():
try:
if self.get(section, attribute) in check:
sections.append(section)
sections.append(section)
except:
self.logger.warn("Section {} has no option '{}'".format(section, attribute))
return sections
@ -45,7 +45,7 @@ class vwConfig(object):
return True
def update_jira_profiles(self, profiles):
# create JIRA profiles in the ini config file
# create JIRA profiles in the ini config file
self.logger.debug('Updating Jira profiles: {}'.format(str(profiles)))
for profile in profiles:
@ -67,7 +67,7 @@ class vwConfig(object):
self.config.set(section_name, 'min_critical_to_report', 'high')
self.config.set(section_name, '; automatically report, boolean value ')
self.config.set(section_name, 'autoreport', 'false')
# TODO: try/catch this
# writing changes back to file
with open(self.config_in, 'w') as configfile: