)
return self.add(v)
- def new_vex_patched_relationship(self, from_, to):
+ def new_vex_patched_relationship(self, from_, to, notes: None):
+ props = {'security_statusNotes': notes} if notes else {}
return self._new_relationship(
oe.spdx30.security_VexFixedVulnAssessmentRelationship,
from_,
to,
spdxid_name="vex-fixed",
security_vexVersion=VEX_VERSION,
+ **props,
)
- def new_vex_unpatched_relationship(self, from_, to):
+ def new_vex_unpatched_relationship(self, from_, to, notes: None):
+ props = {'security_statusNotes': notes} if notes else {}
return self._new_relationship(
oe.spdx30.security_VexAffectedVulnAssessmentRelationship,
from_,
spdxid_name="vex-affected",
security_vexVersion=VEX_VERSION,
security_actionStatement="Mitigation action unknown",
+ **props,
)
- def new_vex_ignored_relationship(self, from_, to, *, impact_statement):
+ def new_vex_ignored_relationship(self, from_, to, *, impact_statement, notes: None):
+ props = {'security_statusNotes': notes} if notes else {}
return self._new_relationship(
oe.spdx30.security_VexNotAffectedVulnAssessmentRelationship,
from_,
spdxid_name="vex-not-affected",
security_vexVersion=VEX_VERSION,
security_impactStatement=impact_statement,
+ **props,
)
def import_bitbake_build_objset(self):
if status == "Patched":
spdx_vex = recipe_objset.new_vex_patched_relationship(
- [spdx_cve_id], [recipe]
+ [spdx_cve_id], [recipe],
+ notes=": ".join(v for v in (detail, description) if v)
)
patches = []
for idx, filepath in enumerate(resources):
)
elif status == "Unpatched":
- recipe_objset.new_vex_unpatched_relationship([spdx_cve_id], [recipe])
+ recipe_objset.new_vex_unpatched_relationship(
+ [spdx_cve_id], [recipe],
+ notes=": ".join(v for v in (detail, description) if v)
+ )
elif status == "Ignored":
spdx_vex = recipe_objset.new_vex_ignored_relationship(
[spdx_cve_id],
[recipe],
impact_statement=description,
+ notes=detail,
)
vex_just_type = d.getVarFlag("CVE_CHECK_VEX_JUSTIFICATION", detail)