Add a security scanner api config object for params
Change SecScanAPI to use a uri creation func instead of test context Pass config provider through validator context Remove app config dependency for validators
This commit is contained in:
parent
554d4f47a8
commit
7df8ed4a60
47 changed files with 305 additions and 166 deletions
|
@ -68,3 +68,7 @@ class BaseFileProvider(BaseProvider):
|
|||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_config_root(self):
|
||||
return self.config_volume
|
||||
|
||||
|
|
|
@ -123,3 +123,8 @@ class BaseProvider(object):
|
|||
def get_volume_path(self, directory, filename):
|
||||
""" Helper for constructing relative file paths, which may differ between providers.
|
||||
For example, kubernetes can't have subfolders in configmaps """
|
||||
|
||||
@abstractmethod
|
||||
def get_config_root(self):
|
||||
""" Returns the config root directory. """
|
||||
|
||||
|
|
|
@ -10,6 +10,11 @@ REAL_FILES = ['test/data/signing-private.gpg', 'test/data/signing-public.gpg', '
|
|||
class TestConfigProvider(BaseProvider):
|
||||
""" Implementation of the config provider for testing. Everything is kept in-memory instead on
|
||||
the real file system. """
|
||||
|
||||
def get_config_root(self):
|
||||
raise Exception('Test Config does not have a config root')
|
||||
# return ''
|
||||
|
||||
def __init__(self):
|
||||
self.clear()
|
||||
|
||||
|
|
Reference in a new issue