From a4625184262c310e7d78da9029e13bb5a82599a2 Mon Sep 17 00:00:00 2001 From: Fabian von Feilitzsch Date: Mon, 19 Aug 2024 16:18:47 -0400 Subject: [PATCH 1/2] :bug: When importer args aren't provided, don't use empty string as url Signed-off-by: Fabian von Feilitzsch --- build/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/entrypoint.sh b/build/entrypoint.sh index bc0857ae..220c64a2 100755 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -40,5 +40,5 @@ if [[ ${MODE} != "importer" ]]; then PYTHONPATH="/kai/kai" exec gunicorn --timeout 3600 -w "${NUM_WORKERS}" --bind 0.0.0.0:8080 --worker-class aiohttp.GunicornWebWorker 'kai.server:app()' else cd /kai || exit - python ./kai/hub_importer.py --loglevel "${LOGLEVEL}" --config_filepath ./kai/config.toml "${IMPORTER_ARGS}" "${HUB_URL}" + python ./kai/hub_importer.py --loglevel "${LOGLEVEL}" --config_filepath ./kai/config.toml "${HUB_URL}" "${IMPORTER_ARGS}" fi From 52a1731817a33deb969e036c99524c1b43cdd1c8 Mon Sep 17 00:00:00 2001 From: Fabian von Feilitzsch Date: Mon, 19 Aug 2024 16:20:15 -0400 Subject: [PATCH 2/2] :bug: Pass analysis ID in when report is loaded Signed-off-by: Fabian von Feilitzsch --- kai/hub_importer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kai/hub_importer.py b/kai/hub_importer.py index fd80bb6f..f4fa2c79 100755 --- a/kai/hub_importer.py +++ b/kai/hub_importer.py @@ -332,7 +332,11 @@ def process_analyses( } if report_data: reports.append( - (application, credentials, Report.load_report_from_object(report_data)) + ( + application, + credentials, + Report.load_report_from_object(report_data, analysis.id), + ) ) return reports