diff --git a/endpoints/api/logs.py b/endpoints/api/logs.py index 3602bbace..1bb5bf320 100644 --- a/endpoints/api/logs.py +++ b/endpoints/api/logs.py @@ -221,7 +221,7 @@ class UserAggregateLogs(ApiResource): user = get_authenticated_user() return get_aggregate_logs(start_time, end_time, performer_name=performer_name, - namespace=user.username) + namespace=user.username, ignore=SERVICE_LEVEL_LOG_KINDS) @resource('/v1/organization//aggregatelogs') diff --git a/endpoints/web.py b/endpoints/web.py index 03cce54a4..668221a51 100644 --- a/endpoints/web.py +++ b/endpoints/web.py @@ -211,6 +211,7 @@ def security(): @web.route('/enterprise/') @no_cache +@route_show_if(features.BILLING) def enterprise(): return index('') diff --git a/static/directives/image-feature-view.html b/static/directives/image-feature-view.html index 34e428203..be75710b7 100644 --- a/static/directives/image-feature-view.html +++ b/static/directives/image-feature-view.html @@ -11,7 +11,7 @@
This image could not be indexed
- Our security scanner was unable to index this image. + Quay security scanner was unable to index this image.
diff --git a/util/config/configutil.py b/util/config/configutil.py index 969de2a52..aa088f7ae 100644 --- a/util/config/configutil.py +++ b/util/config/configutil.py @@ -1,5 +1,3 @@ -import yaml - from random import SystemRandom def generate_secret_key(): @@ -71,4 +69,4 @@ def add_enterprise_config_defaults(config_obj, current_secret_key, hostname): # Misc configuration. config_obj['PREFERRED_URL_SCHEME'] = config_obj.get('PREFERRED_URL_SCHEME', 'http') config_obj['ENTERPRISE_LOGO_URL'] = config_obj.get( - 'ENTERPRISE_LOGO_URL', '/static/img/QuayEnterprise_horizontal_color.svg') + 'ENTERPRISE_LOGO_URL', '/static/img/quay-logo.png') diff --git a/workers/securityworker.py b/workers/securityworker.py index f8b0a09cb..7c86962c5 100644 --- a/workers/securityworker.py +++ b/workers/securityworker.py @@ -6,7 +6,7 @@ import time from peewee import fn -from app import app, config_provider, secscan_api +from app import app, secscan_api from workers.worker import Worker from data.database import Image, UseThenDisconnect from data.model.image import get_image_with_storage_and_parent_base @@ -22,10 +22,9 @@ logger = logging.getLogger(__name__) class SecurityWorker(Worker): def __init__(self): super(SecurityWorker, self).__init__() - validator = SecurityConfigValidator(app.config, config_provider) + validator = SecurityConfigValidator(app.config) if validator.valid(): - secscan_config = app.config.get('SECURITY_SCANNER') - self._target_version = secscan_config['ENGINE_VERSION_TARGET'] + self._target_version = app.config.get('SECURITY_SCANNER_ENGINE_VERSION_TARGET', 2) self._analyzer = LayerAnalyzer(app.config, secscan_api) # Get the ID of the first image we want to analyze. @@ -43,8 +42,11 @@ class SecurityWorker(Worker): base_query = get_image_with_storage_and_parent_base() return base_query.where(Image.security_indexed_engine < self._target_version) - # Get the ID of the last image we can analyze. + # Get the ID of the last image we can analyze. Will be None if there are no images in the + # database. max_id = Image.select(fn.Max(Image.id)).scalar() + if max_id is None: + return with UseThenDisconnect(app.config): for candidate, abt in yield_random_entries(batch_query, Image.id, BATCH_SIZE, max_id,