containerbuildsystem / cachi2

Cachi2 is a CLI tool that pre-fetches your project's dependencies to aid in making your build process network-isolated.
GNU General Public License v3.0
7 stars 25 forks source link

Adopt a new PURL format for RPMs #600

Closed eskultety closed 2 weeks ago

eskultety commented 4 weeks ago

The official PURL spec for RPMs is vague [1]. Red Hat product security team published a PURL guideline for their internal build processes which addresses some of the pitfalls in the current upstream PURL spec and takes a slightly different approach with some of the qualifiers [2]. Some of the fields appear to be more standardized compared to its upstream counterpart this patch adopts the format for now, at least until a more refined vendor-agnostic PURL guideline for RPMs is posted in the upstream space. Most notable changes:

EXAMPLES:

For what it's worth I also tried to revive an old thread on namespaces in the upstream PURL spec to request refreshment of the PURL to cover additional cases: https://github.com/package-url/purl-spec/issues/239 I used the opportunity to also mention [2] to the community and our intended approach as implemented by this PR.

[1] https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst#rpm [2] https://redhatproductsecurity.github.io/security-data-guidelines/purl/

Maintainers will complete the following section

Note: if the contribution is external (not from an organization member), the CI pipeline will not run automatically. After verifying that the CI is safe to run:

eskultety commented 4 weeks ago

Tests updated -> ready to review.

eskultety commented 3 weeks ago

Since v2:

brunoapimentel commented 3 weeks ago

I noticed that this improvement has also solved the issue of duplicated SBOM components for noarch RPMs that come from the same repoid (although we still download them individually for each arch they happen to be listed under). Should we make not of this in the commit message?

eskultety commented 3 weeks ago

I noticed that this improvement has also solved the issue of duplicated SBOM components for noarch RPMs that come from the same repoid (although we still download them individually for each arch they happen to be listed under). Should we make not of this in the commit message?

Huh, I just noticed the code being part of the SBOM output model which I only noticed just now, sure.

eskultety commented 3 weeks ago

Since v3:

brunoapimentel commented 3 weeks ago

/retest