bugfix: false positive of SA with missing packages
This commit is contained in:
Kirill Zhukov 2023-01-04 11:15:29 +01:00
parent b1fc8b4281
commit 8bf501c922
2 changed files with 6 additions and 3 deletions

View File

@ -181,7 +181,7 @@ def compare(rhel_oval: Dict[str, SecurityAdvisory],
# check if some packages are missing from oval SA
alma_oval_packages = alma_oval_sa.packages
alma_oval_missing_packages = [str(r) for r in packages_to_check
if r not in alma_oval_packages]
if str(r) not in [str(i) for i in alma_oval_packages]]
if alma_oval_missing_packages:
report['diff_count'] += 1
diff_str = f"missing packages in oval SA: {','.join(alma_oval_missing_packages)}"
@ -207,8 +207,9 @@ def compare(rhel_oval: Dict[str, SecurityAdvisory],
continue
# check if some packages are missing from errata SA
alma_errata_packages = alma_errata_sa.packages
alma_errata_missing_packages = [
str(r) for r in packages_to_check if r not in alma_errata_packages]
alma_errata_missing_packages = \
[str(r) for r in packages_to_check
if str(r) not in [str(i) for i in alma_errata_packages]]
if alma_errata_missing_packages:
report['diff_count'] += 1
diff_str = f"missing packages in errata SA: {','.join(alma_errata_missing_packages)}"

View File

@ -1,2 +1,4 @@
2022-12-30 v1.0.0
First version of service
2023-01-04 v1.0.1
Fixed missing packages false positives