From 389e1a5cbda02ee1853076b0e8926aa44a54ab0f Mon Sep 17 00:00:00 2001 From: rabbitali Date: Tue, 19 Sep 2023 17:05:25 +0800 Subject: [PATCH] bugfix: cve fix result parsing error (cherry picked from commit b920e4deee809a78e36f0ab5d3123ef5606249ac) --- ...-bugfix-cve-fix-result-parsing-error.patch | 29 +++++++++++++++++++ aops-zeus.spec | 6 +++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0004-bugfix-cve-fix-result-parsing-error.patch diff --git a/0004-bugfix-cve-fix-result-parsing-error.patch b/0004-bugfix-cve-fix-result-parsing-error.patch new file mode 100644 index 0000000..40248be --- /dev/null +++ b/0004-bugfix-cve-fix-result-parsing-error.patch @@ -0,0 +1,29 @@ +From 21a8a9db54175547675bda5214d98ffa5a654d03 Mon Sep 17 00:00:00 2001 +From: rabbitali +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 + diff --git a/aops-zeus.spec b/aops-zeus.spec index d84b046..00f2c2e 100644 --- a/aops-zeus.spec +++ b/aops-zeus.spec @@ -1,6 +1,6 @@ Name: aops-zeus Version: v1.3.0 -Release: 3 +Release: 4 Summary: A host and user manager service which is the foundation of aops. License: MulanPSL2 URL: https://gitee.com/openeuler/%{name} @@ -8,6 +8,7 @@ Source0: %{name}-%{version}.tar.gz Patch0001: 0001-add-file-sync-func.patch Patch0002: 0002-update-callback-request-headers.patch Patch0003: 0003-fix-bash-file-sync-error.patch +Patch0004: 0004-bugfix-cve-fix-result-parsing-error.patch BuildRequires: python3-setuptools @@ -48,6 +49,9 @@ cp -r database %{buildroot}/opt/aops/ %changelog +* Tue Sep 19 2023 wenxin - v1.3.0-4 +- bugfix: cve fix result parsing error + * Tue Sep 19 2023 wenxin - v1.3.0-3 - update callback request headers - fix bash file sync error -- Gitee