diff --git a/.env b/.env index f07b0f577b..d31f5a9f62 100644 --- a/.env +++ b/.env @@ -5,7 +5,7 @@ ### the COMPOSE_FILE variable each separated with ':'. If you are on windows, replace all ':' with ';'. ### Reference to Docker's official Docs: https://docs.docker.com/compose/reference/envvars/#compose_file#compose_file -INTELOWL_TAG_VERSION=v1.5.0 +INTELOWL_TAG_VERSION=v1.5.1 ###### Default (Production) ###### diff --git a/Dockerfile b/Dockerfile index c035b33034..41112ad6bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ ENV DJANGO_SETTINGS_MODULE intel_owl.settings ENV PYTHONPATH /opt/deploy/intel_owl ENV LOG_PATH /var/log/intel_owl ENV ELASTICSEARCH_DSL_VERSION 7.1.4 +ENV watch_logs_cmd "watch -n1 tail -n10 /var/log/intel_owl/django/api_app.log" RUN mkdir -p ${LOG_PATH} \ ${LOG_PATH}/django ${LOG_PATH}/uwsgi \ diff --git a/Dockerfile_nginx b/Dockerfile_nginx index 4f00533985..57bf0ebc40 100644 --- a/Dockerfile_nginx +++ b/Dockerfile_nginx @@ -1,5 +1,5 @@ # Stage 1: Get build artifacts from intelowl-ng -FROM intelowlproject/intelowl_ng:v1.5.0 AS angular-prod-build +FROM intelowlproject/intelowl_ng:v1.5.1 AS angular-prod-build # Stage 2: Inject the build artifacts into nginx container FROM library/nginx:1.16.1-alpine diff --git a/api_app/api.py b/api_app/api.py index 51c7629d23..dcb19ae98a 100644 --- a/api_app/api.py +++ b/api_app/api.py @@ -211,14 +211,6 @@ def send_analysis_request(request): {"error": "813"}, status=status.HTTP_400_BAD_REQUEST ) - runtime_conf = data_received.get("runtime_configuration", None) - if runtime_conf: - if not isinstance(runtime_conf, dict): - return Response( - {"error": "817"}, status=status.HTTP_400_BAD_REQUEST - ) - params["runtime_configuration"] = runtime_conf - # we need to clean the list of requested analyzers, # ... based on configuration data analyzers_config = helpers.get_analyzer_config() @@ -274,7 +266,7 @@ def send_analysis_request(request): general.start_analyzers( params["analyzers_to_execute"], analyzers_config, - runtime_conf, + serialized_data["runtime_configuration"], job_id, md5, is_sample, diff --git a/api_app/serializers.py b/api_app/serializers.py index 3100ea811c..e54336a673 100644 --- a/api_app/serializers.py +++ b/api_app/serializers.py @@ -1,3 +1,5 @@ +import json + from django.contrib.auth.models import Group from rest_framework import serializers from rest_framework_guardian.serializers import ObjectPermissionsAssignmentMixin @@ -99,6 +101,14 @@ def get_permissions_map(self, created): "view_job": [*grps], } + def validate(self, data): + # check and validate runtime_configuration + runtime_conf = data.get("runtime_configuration", {}) + if runtime_conf and isinstance(runtime_conf, list): + runtime_conf = json.loads(runtime_conf[0]) + data["runtime_configuration"] = runtime_conf + return data + def create(self, validated_data): tags = validated_data.pop("tags_id", None) job = Job.objects.create(**validated_data) diff --git a/docs/source/conf.py b/docs/source/conf.py index c7f06e2b68..3c6738536d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,7 +22,7 @@ author = "Matteo Lodi" # The full version, including alpha/beta/rc tags -release = "1.5.0" +release = "1.5.1" # -- General configuration ---------------------------------------------------