diff --git a/cve_support/cve_policy_filter.py b/cve_support/cve_policy_filter.py index f6271ef0..8606e416 100644 --- a/cve_support/cve_policy_filter.py +++ b/cve_support/cve_policy_filter.py @@ -18,6 +18,7 @@ cves_valid = [] cves_to_fix = [] cves_to_fix_lp = [] cves_to_track = [] +cves_to_track_lp_fixed = [] cves_w_errors = [] cves_wont_fix = [] cves_to_omit = [] @@ -54,6 +55,7 @@ def print_html_report(cves_report, title): template = template_env.get_template(template_file) output_text = template.render(cves_to_fix=cves_report["cves_to_fix"],\ cves_to_fix_lp=cves_report["cves_to_fix_lp"],\ + cves_to_track_lp_fixed=cves_report["cves_to_track_lp_fixed"],\ cves_to_track=cves_report["cves_to_track"],\ cves_wont_fix=cves_report["cves_wont_fix"],\ cves_w_errors=cves_report["cves_w_errors"],\ @@ -103,6 +105,15 @@ def print_report(cves_report, title): cve_line.append(key + ":" + str(value)) print(cve_line) + print("\nCVEs to track for launchpad fixed: %d \n" \ + % (len(cves_report["cves_to_track_lp_fixed"]))) + for cve in cves_report["cves_to_track_lp_fixed"]: + cve_line = [] + for key, value in cve.items(): + if key != "summary": + cve_line.append(key + ":" + str(value)) + print(cve_line) + print("\nCVEs to track for incoming fix: %d \n" \ % (len(cves_report["cves_to_track"]))) for cve in cves_report["cves_to_track"]: @@ -172,6 +183,7 @@ def update_report(): cves_report["cves_to_fix"] = cves_to_fix cves_report["cves_to_fix_lp"] = cves_to_fix_lp cves_report["cves_to_track"] = cves_to_track + cves_report["cves_to_track_lp_fixed"] = cves_to_track_lp_fixed cves_report["cves_w_errors"] = cves_w_errors cves_report["cves_wont_fix"] = cves_wont_fix cves_report["cves_to_omit"] = cves_to_omit @@ -193,6 +205,8 @@ def cvssv3_pb_alg(): print(bug["status"]) if (bug["status"] == "Invalid" or bug["status"] == "Won't Fix"): cves_wont_fix.append(cve) + elif (bug["status"] == "Fix Released"): + cves_to_track_lp_fixed.append(cve) else: cves_to_fix_lp.append(cve) else: @@ -221,6 +235,8 @@ def cvssv2_pb_alg(): print(bug["status"]) if (bug["status"] == "Invalid" or bug["status"] == "Won't Fix"): cves_wont_fix.append(cve) + elif (bug["status"] == "Fix Released"): + cves_to_track_lp_fixed.append(cve) else: cves_to_fix_lp.append(cve) else: diff --git a/cve_support/template.txt b/cve_support/template.txt index b1eeabdc..fd907f28 100644 --- a/cve_support/template.txt +++ b/cve_support/template.txt @@ -45,6 +45,28 @@ {% endfor %} {% endif %} +

CVEs to track for launchpad fixed: {{cves_to_track_lp_fixed | length}}

+ + {% if cves_to_track_lp_fixed|length >= 1 %} + + {% for head in heads %} + + {% endfor %} + + + {% for cve in cves_to_track_lp_fixed %} + + + + + + + + + + {% endfor %} + {% endif %} +
{{head}}
{{cve["id"]}}{{cve["status"]}}{{cve["cvss2Score"]}}{{cve["av"]}}{{cve["ac"]}}{{cve["au"]}}{{cve["ai"]}}

CVEs to track for incoming fix: {{cves_to_track | length}}

{% if cves_to_track|length >= 1 %} diff --git a/cve_support/template_v3.txt b/cve_support/template_v3.txt index 870ca518..8e57a325 100644 --- a/cve_support/template_v3.txt +++ b/cve_support/template_v3.txt @@ -47,6 +47,29 @@ {% endfor %} {% endif %}
+

CVEs to track for launchpad fixed: {{cves_to_track_lp_fixed | length}}

+ + {% if cves_to_track_lp_fixed|length >= 1 %} + + {% for head in heads %} + + {% endfor %} + + + {% for cve in cves_to_track_lp_fixed %} + + + + + + + + + + + {% endfor %} + {% endif %} +
{{head}}
{{cve["id"]}}{{cve["status"]}}{{cve["cvss3Score"]}}{{cve["av"]}}{{cve["ac"]}}{{cve["pr"]}}{{cve["ui"]}}{{cve["ai"]}}

CVEs to track for incoming fix: {{cves_to_track | length}}

{% if cves_to_track|length >= 1 %}