Merge ~litios/ubuntu-cve-tracker:feature/customer_oval_merge into ubuntu-cve-tracker:master

Proposed by David Fernandez Gonzalez
Status: Work in progress
Proposed branch: ~litios/ubuntu-cve-tracker:feature/customer_oval_merge
Merge into: ubuntu-cve-tracker:master
Diff against target: 34 lines (+6/-5)
1 file modified
scripts/cve_lib.py (+6/-5)
Reviewer Review Type Date Requested Status
Customer PPAs Security Team Pending
Eduardo Barretto Pending
Ubuntu Security Team Pending
Review via email: mp+461363@code.launchpad.net

Description of the change

Add a new key (oval_merge) to the config of customer projects to support merging OVAL feeds.

Example: https://pastebin.ubuntu.com/p/m8Qg6FX8KX/

To post a comment you must log in.
Revision history for this message
David Fernandez Gonzalez (litios) wrote :

After discussion with Eduardo, marking as WIP since we may not need this at all.

Unmerged commits

54ca5ea... by David Fernandez Gonzalez

[OVAL+CUSTOMER-PPA] Add flag to list needs-to-merge OVAL files

Signed-off-by: David Fernandez Gonzalez <email address hidden>

Succeeded
[SUCCEEDED] unit-tests:0 (build)
[SUCCEEDED] check-cves:0 (build)
12 of 2 results

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/cve_lib.py b/scripts/cve_lib.py
2index c97cae6..9d5caa3 100755
3--- a/scripts/cve_lib.py
4+++ b/scripts/cve_lib.py
5@@ -988,7 +988,8 @@ def find_external_subproject_cves(cve):
6 # except for the extra 'product' and 'release' keys.
7 MANDATORY_EXTERNAL_SUBPROJECT_KEYS = ['cve_triage', 'cve_patching', 'cve_notification', 'security_updates_notification', 'binary_copies_only', 'seg_support', 'owners', 'subprojects']
8 MANDATORY_EXTERNAL_SUBPROJECT_PPA_KEYS = ['ppas', 'oval', 'product', 'release', 'supported_packages']
9-OPTIONAL_EXTERNAL_SUBPROJECT_PPA_KEYS = ['parent', 'name', 'codename', 'description', 'aliases', 'archs', 'lp_distribution']
10+OPTIONAL_EXTERNAL_SUBPROJECT_KEYS = ['oval_merge']
11+OPTIONAL_EXTERNAL_SUBPROJECT_PPA_KEYS = ['parent', 'name', 'codename', 'description', 'aliases', 'archs', 'lp_distribution', 'oval_merge']
12
13 def load_external_subprojects(strict=False):
14 """Search for and load subprojects into the global subprojects dict.
15@@ -1022,15 +1023,15 @@ def load_external_subprojects(strict=False):
16 main_config = read_external_subproject_config(subproject_path)
17 support_metadata = {}
18
19- for key in MANDATORY_EXTERNAL_SUBPROJECT_KEYS:
20- if key not in main_config:
21+ for key in MANDATORY_EXTERNAL_SUBPROJECT_KEYS + OPTIONAL_EXTERNAL_SUBPROJECT_KEYS:
22+ if key in main_config:
23+ support_metadata[key] = main_config[key]
24+ elif key not in OPTIONAL_EXTERNAL_SUBPROJECT_KEYS:
25 error_msg = '%s missing "%s" field.' % (subproject_path, key)
26 if strict:
27 raise ValueError(error_msg)
28 else:
29 print(error_msg, file=sys.stderr)
30- else:
31- support_metadata[key] = main_config[key]
32
33 for subproject in main_config['subprojects']:
34 config = main_config['subprojects'][subproject]

Subscribers

People subscribed via source and target branches