bugfix: cve fix result parsing error

(cherry picked from commit b920e4deee809a78e36f0ab5d3123ef5606249ac)
This commit is contained in:
rabbitali 2023-09-19 17:05:25 +08:00 committed by openeuler-sync-bot
parent cffc66302a
commit f79cdfaade
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 21a8a9db54175547675bda5214d98ffa5a654d03 Mon Sep 17 00:00:00 2001
From: rabbitali <shusheng.wen@outlook.com>
Date: Tue, 19 Sep 2023 16:58:56 +0800
Subject: [PATCH 1/1] bugfix: cve fix result parsing error
---
zeus/vulnerability_manage/view.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/zeus/vulnerability_manage/view.py b/zeus/vulnerability_manage/view.py
index b5360e2..345978f 100644
--- a/zeus/vulnerability_manage/view.py
+++ b/zeus/vulnerability_manage/view.py
@@ -416,10 +416,11 @@ class ExecuteCveFixTask(BaseResponse, BaseExcuteTask):
cve_fix_result_json = json.loads(cve_fix_result)
if cve_fix_result_json.pop("code") != state.SUCCEED:
request_body["status"] = CveTaskStatus.FAIL
+ else:
+ request_body["status"] = CveTaskStatus.SUCCEED
request_body.update(
{
- "status": CveTaskStatus.SUCCEED,
"check_items": cve_fix_result_json.get("check_items"),
"cves": cve_fix_result_json.get("cves"),
}
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: aops-zeus Name: aops-zeus
Version: v1.3.0 Version: v1.3.0
Release: 3 Release: 4
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}
@ -8,6 +8,7 @@ Source0: %{name}-%{version}.tar.gz
Patch0001: 0001-add-file-sync-func.patch Patch0001: 0001-add-file-sync-func.patch
Patch0002: 0002-update-callback-request-headers.patch Patch0002: 0002-update-callback-request-headers.patch
Patch0003: 0003-fix-bash-file-sync-error.patch Patch0003: 0003-fix-bash-file-sync-error.patch
Patch0004: 0004-bugfix-cve-fix-result-parsing-error.patch
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
@ -48,6 +49,9 @@ cp -r database %{buildroot}/opt/aops/
%changelog %changelog
* Tue Sep 19 2023 wenxin<shusheng.wen@outlook.com> - v1.3.0-4
- bugfix: cve fix result parsing error
* Tue Sep 19 2023 wenxin<shusheng.wen@outlook.com> - v1.3.0-3 * Tue Sep 19 2023 wenxin<shusheng.wen@outlook.com> - v1.3.0-3
- update callback request headers - update callback request headers
- fix bash file sync error - fix bash file sync error