update version to 1.3.4-10

This commit is contained in:
rabbitali 2023-11-16 10:19:43 +08:00
parent 90278164d4
commit 2ca53dc81c
5 changed files with 141 additions and 3 deletions

View File

@ -0,0 +1,28 @@
From c4e6df14e518206ee9f4de55b3ba45f9f6632d1b Mon Sep 17 00:00:00 2001
From: gongzt <gong_zhengtang@163.com>
Date: Mon, 23 Oct 2023 15:39:44 +0800
Subject: Fixed the problem that the number of hosts in the cve list repeated statistics
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
database/apollo.sql | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/database/apollo.sql b/database/apollo.sql
index a87f85c..b79707b 100644
--- a/database/apollo.sql
+++ b/database/apollo.sql
@@ -130,7 +130,7 @@ BEGIN
DROP TABLE IF EXISTS cve_host_user_count;
SET @tmp_cve_host_count_sql = 'CREATE TEMPORARY TABLE cve_host_user_count SELECT
cve_id,
- COUNT(host_id) AS host_num
+ COUNT(DISTINCT host_id) AS host_num
FROM
cve_host_match FORCE INDEX (ix_cve_host_match_host_id)
WHERE 1=1 ';
--
Gitee

View File

@ -0,0 +1,41 @@
From fc2c7e76531306699e5c5dd0273dfe5fe521d2f8 Mon Sep 17 00:00:00 2001
From: rabbitali <wenxin32@foxmail.com>
Date: Tue, 24 Oct 2023 20:39:44 +0800
Subject: [PATCH 2/2] fix data correction task execution error
---
apollo/database/proxy/task.py | 2 +-
conf/apollo_crontab.yml | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/apollo/database/proxy/task.py b/apollo/database/proxy/task.py
index b1d53c4..17cb274 100644
--- a/apollo/database/proxy/task.py
+++ b/apollo/database/proxy/task.py
@@ -3214,7 +3214,7 @@ class TaskProxy(TaskMysqlProxy, TaskEsProxy):
task_id_list = task_cve_id_list + task_repo_id_list
task_query = self.session.query(Task).filter(Task.task_id.in_(task_id_list)).all()
- running_task_list = [(task.task_id, task.task_type, task.create_time) for task in task_query]
+ running_task_list = [(task.task_id, task.create_time) for task in task_query]
return running_task_list, host_info_list
def update_host_status(self, host_id_list: list):
diff --git a/conf/apollo_crontab.yml b/conf/apollo_crontab.yml
index 29c17b4..4a1f1e9 100644
--- a/conf/apollo_crontab.yml
+++ b/conf/apollo_crontab.yml
@@ -44,6 +44,5 @@
type: data_correct
enable: true
timed:
- day_of_week: 0-6
- hour: 3
- trigger: cron
\ No newline at end of file
+ minutes: 20
+ trigger: interval
\ No newline at end of file
--
2.33.0

View File

@ -0,0 +1,27 @@
From a07a830d931dbcd60deb3c753414defe3e036a20 Mon Sep 17 00:00:00 2001
From: xuyongliang_01 <xuyongliang_yewu@cmss.chinamobile.com>
Date: Mon, 23 Oct 2023 06:35:14 +0000
Subject: [PATCH 1/2] update apollo/database/proxy/host.py.
Signed-off-by: xuyongliang_01 <xuyongliang_yewu@cmss.chinamobile.com>
---
apollo/database/proxy/host.py | 3 ---
1 file changed, 3 deletions(-)
diff --git a/apollo/database/proxy/host.py b/apollo/database/proxy/host.py
index 2ce2005..282193b 100644
--- a/apollo/database/proxy/host.py
+++ b/apollo/database/proxy/host.py
@@ -15,9 +15,6 @@ Time:
Author:
Description: Host table operation
"""
-import math
-from collections import defaultdict
-from typing import List, Tuple
from sqlalchemy import and_, case, func, or_
from sqlalchemy.exc import SQLAlchemyError
--
2.33.0

View File

@ -0,0 +1,26 @@
From 175d79fa735de0ac315c1c9b3893ff850a478b38 Mon Sep 17 00:00:00 2001
From: wang-guangge <wangguangge@huawei.com>
Date: Tue, 14 Nov 2023 15:03:21 +0800
Subject: [PATCH] fix filename bug in gen_updateinfo.py
---
aops-apollo-tool/aops_apollo_tool/gen_updateinfo.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aops-apollo-tool/aops_apollo_tool/gen_updateinfo.py b/aops-apollo-tool/aops_apollo_tool/gen_updateinfo.py
index 26d0704..5785c7c 100644
--- a/aops-apollo-tool/aops_apollo_tool/gen_updateinfo.py
+++ b/aops-apollo-tool/aops_apollo_tool/gen_updateinfo.py
@@ -144,8 +144,8 @@ def generate_package_list(package_dir: str) -> Element:
filename.text = "%s-%s-%s.%s.rpm" % (
package.attrib['name'],
- package.attrib['release'],
package.attrib['version'],
+ package.attrib['release'],
package.attrib['arch'],
)
--
2.27.0

View File

@ -1,6 +1,6 @@
Name: aops-apollo
Version: v1.3.4
Release: 6
Release: 10
Summary: Cve management service, monitor machine vulnerabilities and provide fix functions.
License: MulanPSL2
URL: https://gitee.com/openeuler/%{name}
@ -10,12 +10,16 @@ Patch0002: 0002-fix-query-all-by-cve-list.patch
Patch0003: 0003-fix-cve-list-get-api-query-error.patch
Patch0004: 0004-fix-query-cve-list-error-and-sql-error.patch
Patch0005: 0005-fix-the-severity-field-filtering-error.patch
Patch0006: 0006-fix-cve-list-by-host-count.patch
Patch0007: 0007-fix-data-correction-task-execution-error.patch
Patch0008: 0008-update-apollo-database-proxy-host.py.patch
Patch0009: 0009-fix-filename-bug-in-gen_updateinfo.py.patch
BuildRequires: python3-setuptools
Requires: aops-vulcanus >= v1.3.0
Requires: python3-elasticsearch python3-flask-restful python3-marshmallow >= 3.13.0
Requires: python3-elasticsearch >= 7 python3-flask-restful python3-marshmallow >= 3.13.0
Requires: python3-sqlalchemy python3-PyMySQL python3-Flask-APScheduler >= 1.11.0
Requires: python3-PyYAML python3-flask python3-gevent
Requires: python3-PyYAML python3-flask python3-gevent python3-uWSGI
Requires: python3-retrying python3-lxml
Provides: aops-apollo
@ -72,6 +76,18 @@ popd
%{python3_sitelib}/aops_apollo_tool/*
%changelog
* Tue Nov 14 2023 wangguangge<wangguangge@huawei.com> - v1.3.4-10
- fix filename bug in aops-apollo-tool
* Mon Nov 13 2023 wenxin<wenxin32@foxmail.com> - v1.3.4-9
- Update the installation dependencies
* Tue Oct 24 2023 wenxin<wenxin32@foxmail.com> - v1.3.4-8
- fix data correction task execution error
* Mon Oct 23 2023 gongzhengtang<gong_zhengtang@163.com> - v1.3.4-7
- fixed the problem that the number of hosts in the cve list repeated statistics
* Mon Oct 23 2023 wenxin<wenxin32@foxmail.com> - v1.3.4-6
- fix the severity field filtering error