package/pkg-generic.mk: replicate IGNORE_CVES to host packages
PATCH v2 5/5 package/pkg-generic.mk: replicate IGNORE_CVES to host packages
For host packages, this commit adds the same ignore_cves list as their target counterpart and make it available from the show-info output.
When generating a CycloneDX SBOM with make show-info-all | utils/generate-cyclonedx and running an analysis over it with support/script/cve-check, multiple vulnerabilities
entries would be created with different analysis for packages that have both a host and target variant that include IGNORE_CVES entries.
This is the case for the grub2 package that include ignored vulnerabilities that patch both the target and host package but aren't declared as ignored for the host package. This resulted in vulnerabilities marked as 'exploitable' for the host variant while it is patched.
--- package/pkg-generic.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/pkg-generic.mk +7 -0
@@ -745,6 +745,13 @@ ifeq ($$($(2)_CPE_ID_VALID),YES) $(2)_CPE_ID = $$($(2)_CPE_ID_PREFIX):$$($(2)_CPE_ID_VENDOR):$$($(2)_CPE_ID_PRODUCT):$$($(2)_CPE_ID_VERSION):$$($(2)_CPE_ID_UPDATE):*:*:*:*:*:* endif # ifeq ($$($(2)_CPE_ID_VALID),YES) +# replicate the target '_IGNORE_CVES' to the host variant +ifndef $(2)_IGNORE_CVES + ifdef $(3)_IGNORE_CVES + $(2)_IGNORE_CVES = $$($(3)_IGNORE_CVES) + endif +endif + # When a target package is a toolchain dependency set this variable to # 'NO' so the 'toolchain' dependency is not added to prevent a circular # dependency.
Signature · 6 lines
2.54.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot