Skip to content

Simplify purls for Cargo #962

Open
Open
@chmeliik

Description

@chmeliik

Looking at the purls that Hermeto generates for Cargo packages, I was surprised to see that even the "happy path" case (a normal dependency from the default crates.io registry) gets a complicated purl:

pkg:cargo/[email protected]?checksum=0e60eed09d8c01d3cee5b7d30acb059b76614c918fa0f992e0dd6eeb10daad6f&source=registry%2Bhttps://github.com/rust-lang/crates.io-index

To summarize, I think Cargo purls should:

  • drop checksum
  • replace source with one of repository_url, vcs_url or download_url depending on context
  • not use repository_url when not necessary

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions