!35 [sync] PR-34: update cve fix
From: @openeuler-sync-bot Reviewed-by: @zhu-yuncheng Signed-off-by: @zhu-yuncheng
This commit is contained in:
commit
f8289c4bb9
54
0001-update-cve-fix.patch
Normal file
54
0001-update-cve-fix.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
From 412ebea59d55abbf1acc328077b8854b2634a4d1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: rabbitali <shusheng.wen@outlook.com>
|
||||||
|
Date: Thu, 1 Jun 2023 09:09:39 +0800
|
||||||
|
Subject: [PATCH] update cve fix
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
zeus/function/verify/vulnerability.py | 2 +-
|
||||||
|
zeus/vulnerability_manage/view.py | 8 ++++++--
|
||||||
|
2 files changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/zeus/function/verify/vulnerability.py b/zeus/function/verify/vulnerability.py
|
||||||
|
index 253bb4d..4aabc00 100644
|
||||||
|
--- a/zeus/function/verify/vulnerability.py
|
||||||
|
+++ b/zeus/function/verify/vulnerability.py
|
||||||
|
@@ -75,7 +75,7 @@ class CveFixSchema(TaskGeneralSchema):
|
||||||
|
"""
|
||||||
|
tasks = fields.List(fields.Nested(CveFixTask()),
|
||||||
|
required=True, validate=lambda s: len(s) > 0)
|
||||||
|
-
|
||||||
|
+ accepted = fields.Boolean(validate=validate.OneOf([True, False]),required=True)
|
||||||
|
|
||||||
|
class CveRollbackTask(Schema):
|
||||||
|
host_id = fields.Integer(required=True, validate=lambda s: s > 0)
|
||||||
|
diff --git a/zeus/vulnerability_manage/view.py b/zeus/vulnerability_manage/view.py
|
||||||
|
index adb4bc8..368847c 100644
|
||||||
|
--- a/zeus/vulnerability_manage/view.py
|
||||||
|
+++ b/zeus/vulnerability_manage/view.py
|
||||||
|
@@ -604,7 +604,12 @@ class ExecuteCveFixTask(BaseResponse):
|
||||||
|
})
|
||||||
|
return data
|
||||||
|
|
||||||
|
+ for cve in task_info.get("cves"):
|
||||||
|
+ if cve.get("hotpatch"):
|
||||||
|
+ cve["accepted"] = task_info["accepted"]
|
||||||
|
+
|
||||||
|
command_args = {
|
||||||
|
+ "accepted": task_info.get("accepted"),
|
||||||
|
"check_items": self._check_items,
|
||||||
|
"check": task_info.get("check"),
|
||||||
|
"cves": task_info.get("cves")
|
||||||
|
@@ -732,8 +737,7 @@ class ExecuteCveFixTask(BaseResponse):
|
||||||
|
self._task_name = params.get("task_name")
|
||||||
|
self._task_type = params.get("task_type")
|
||||||
|
self._check_items = params.get('check_items')
|
||||||
|
- tasks = generate_tasks(params.get('tasks'), host_infos,
|
||||||
|
- **{"repo_info": params.get("repo_info")})
|
||||||
|
+ tasks = generate_tasks(params.get('tasks'), host_infos, **{"accepted": params.get("accepted", False)})
|
||||||
|
if params.get("timed"):
|
||||||
|
self._header.update({
|
||||||
|
"exempt_authentication": configuration.individuation.get("EXEMPT_AUTHENTICATION"),
|
||||||
|
--
|
||||||
@ -1,11 +1,11 @@
|
|||||||
Name: aops-zeus
|
Name: aops-zeus
|
||||||
Version: v1.2.1
|
Version: v1.2.1
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: A host and user manager service which is the foundation of aops.
|
Summary: A host and user manager service which is the foundation of aops.
|
||||||
License: MulanPSL2
|
License: MulanPSL2
|
||||||
URL: https://gitee.com/openeuler/%{name}
|
URL: https://gitee.com/openeuler/%{name}
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
Patch0001: 0001-update-cve-fix.patch
|
||||||
|
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
Requires: aops-vulcanus >= v1.2.0
|
Requires: aops-vulcanus >= v1.2.0
|
||||||
@ -21,7 +21,7 @@ A host and user manager service which is the foundation of aops.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version}
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
|
|
||||||
# build for aops-zeus
|
# build for aops-zeus
|
||||||
@ -42,6 +42,9 @@ A host and user manager service which is the foundation of aops.
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 02 2023 wenxin<shusheng.wen@outlook.com> - v1.2.1-2
|
||||||
|
- update cve fix
|
||||||
|
|
||||||
* Tue May 23 2023 wenxin<shusheng.wen@outlook.com> - v1.2.1-1
|
* Tue May 23 2023 wenxin<shusheng.wen@outlook.com> - v1.2.1-1
|
||||||
- add cve rollback api;update cve scan callback func
|
- add cve rollback api;update cve scan callback func
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user