Various small fixes in prep for QE release

This commit is contained in:
Joseph Schorr 2016-05-04 15:20:27 -04:00
parent f55fd2049f
commit 73fa593d02
5 changed files with 11 additions and 10 deletions

View file

@ -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/<orgname>/aggregatelogs')

View file

@ -211,6 +211,7 @@ def security():
@web.route('/enterprise/')
@no_cache
@route_show_if(features.BILLING)
def enterprise():
return index('')

View file

@ -11,7 +11,7 @@
<div class="empty" ng-if="securityStatus == 'failed'">
<div class="empty-primary-msg">This image could not be indexed</div>
<div class="empty-secondary-msg">
Our security scanner was unable to index this image.
Quay security scanner was unable to index this image.
</div>
</div>

View file

@ -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')

View file

@ -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,