diff options
Diffstat (limited to 'meta/lib')
| -rw-r--r-- | meta/lib/oe/cve_check.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/lib/oe/cve_check.py b/meta/lib/oe/cve_check.py index ed5c714cb8..7c09b78242 100644 --- a/meta/lib/oe/cve_check.py +++ b/meta/lib/oe/cve_check.py | |||
| @@ -243,3 +243,25 @@ def decode_cve_status(d, cve): | |||
| 243 | status_mapping = "Unpatched" | 243 | status_mapping = "Unpatched" |
| 244 | 244 | ||
| 245 | return (status_mapping, detail, description) | 245 | return (status_mapping, detail, description) |
| 246 | |||
| 247 | def extend_cve_status(d): | ||
| 248 | # do this only once in case multiple classes use this | ||
| 249 | if d.getVar("CVE_STATUS_EXTENDED"): | ||
| 250 | return | ||
| 251 | d.setVar("CVE_STATUS_EXTENDED", "1") | ||
| 252 | |||
| 253 | # Fallback all CVEs from CVE_CHECK_IGNORE to CVE_STATUS | ||
| 254 | cve_check_ignore = d.getVar("CVE_CHECK_IGNORE") | ||
| 255 | if cve_check_ignore: | ||
| 256 | bb.warn("CVE_CHECK_IGNORE is deprecated in favor of CVE_STATUS") | ||
| 257 | for cve in (d.getVar("CVE_CHECK_IGNORE") or "").split(): | ||
| 258 | d.setVarFlag("CVE_STATUS", cve, "ignored") | ||
| 259 | |||
| 260 | # Process CVE_STATUS_GROUPS to set multiple statuses and optional detail or description at once | ||
| 261 | for cve_status_group in (d.getVar("CVE_STATUS_GROUPS") or "").split(): | ||
| 262 | cve_group = d.getVar(cve_status_group) | ||
| 263 | if cve_group is not None: | ||
| 264 | for cve in cve_group.split(): | ||
| 265 | d.setVarFlag("CVE_STATUS", cve, d.getVarFlag(cve_status_group, "status")) | ||
| 266 | else: | ||
| 267 | bb.warn("CVE_STATUS_GROUPS contains undefined variable %s" % cve_status_group) | ||
