Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle SBOM package external references of type "security" different #509

Open
ctron opened this issue Jul 5, 2024 · 1 comment
Open

Comments

@ctron
Copy link
Contributor

ctron commented Jul 5, 2024

In recent SBOMs (not sure when that was added) the SBOM packages contain additional external CPE references of type "security" (also see: https://spdx.github.io/spdx-spec/v2.3/external-repository-identifiers/#f2-security):

It’s recommended practice for SPDX SBOM document creators to include one or more package identifiers (e.g. CPE, GitBOM, PURL or SWID) when using SPDX external references for the purpose of resolving current security vulnerability information.

As they don't act as a reference to the packages/components, but are an additional information "where to find security information for". In fact, this is how it looks for a random component out of this SBOM:

{
    "copyrightText": "[…]",
    "downloadLocation": "https://access.redhat.com/downloads/content/package\u002Dbrowser",
    "externalRefs": [
    {
        "referenceCategory": "SECURITY",
        "referenceLocator": "cpe:/a:redhat:enterprise_linux:9::appstream",
        "referenceType": "cpe22Type"
    },
    {
        "referenceCategory": "SECURITY",
        "referenceLocator": "cpe:/a:redhat:rhel_eus:9.2::appstream",
        "referenceType": "cpe22Type"
    },
    {
        "referenceCategory": "SECURITY",
        "referenceLocator": "cpe:/o:redhat:enterprise_linux:9::baseos",
        "referenceType": "cpe22Type"
    },
    {
        "referenceCategory": "SECURITY",
        "referenceLocator": "cpe:/o:redhat:rhel_eus:9.2::baseos",
        "referenceType": "cpe22Type"
    },
    {
        "referenceCategory": "PACKAGE_MANAGER",
        "referenceLocator": "pkg:rpm/redhat/pkgconf@1.7.3-10.el9?arch=src",
        "referenceType": "purl"
    }
    ],
    "filesAnalyzed": false,
    "homepage": "NOASSERTION",
    "licenseComments": "Licensing information is automatically generated and may be incomplete or incorrect.",
    "licenseConcluded": "AUTOCONF-EXCEPTION-2.0 AND AUTOCONF-SIMPLE-EXCEPTION AND AUTOCONF-SIMPLE-EXCEPTION-2.0 AND BSD-ORIGINAL AND BSD-SIMPLIFIED AND FREE-UNKNOWN AND FSF-FREE AND FSF-UNLIMITED AND FSF-UNLIMITED-NO-WARRANTY AND GPL-2.0-PLUS AND GPL-3.0-PLUS AND ISC AND LIBTOOL-EXCEPTION-2.0 AND MIT AND MIT-TAYLOR-VARIANT AND PUBLIC-DOMAIN AND X11-XCONSORTIUM",
    "licenseDeclared": "ISC",
    "name": "pkgconf",
    "originator": "NOASSERTION",
    "packageFileName": "pkgconf-1.7.3-10.el9.src.rpm",
    "SPDXID": "SPDXRef-01191fde-41d3-46e8-912e-9a22e3b9d633",
    "supplier": "Organization: Red Hat",
    "versionInfo": "1.7.3-10.el9"
}

This means that we can't simply assign the CPEs to the SBOM packages as reference without a further qualifier.

ctron added a commit to ctron/trustify that referenced this issue Jul 5, 2024
The "security" category is intended to find security information
about this package, but not describing the package itself.

Works around trustification#509
ctron added a commit to ctron/trustify that referenced this issue Jul 5, 2024
The "security" category is intended to find security information
about this package, but not describing the package itself.

Works around trustification#509
@ctron
Copy link
Contributor Author

ctron commented Jul 5, 2024

Ok, it looks like ignoring all but PACKAGE_MANGER will lead to not having CPEs at all. So maybe we need a different approach now.

ctron added a commit to ctron/trustify that referenced this issue Jul 8, 2024
The "security" category is intended to find security information
about this package, but not describing the package itself.

Works around trustification#509
ctron added a commit to ctron/trustify that referenced this issue Jul 8, 2024
The "security" category is intended to find security information
about this package, but not describing the package itself.

Works around trustification#509
github-merge-queue bot pushed a commit that referenced this issue Jul 8, 2024
The "security" category is intended to find security information
about this package, but not describing the package itself.

Works around #509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant