Skip to content

CEP 49: Package-URLs (PURLs) for conda packages - #159

Merged
jaimergp merged 25 commits into
conda:mainfrom
chenghlee:conda-purl-definition
Sep 23, 2026
Merged

jaimergp merged 25 commits into
conda:mainfrom
chenghlee:conda-purl-definition

Conversation

@chenghlee

@chenghlee chenghlee commented Apr 7, 2026 •

Copy link
Copy Markdown
Contributor

Checklist for submitter

  • I am submitting a new CEP: Package-URLs (PURLs) for conda packages.
    • I am using the CEP template by creating a copy cep-0000.md named cep-XXXX.md in the root level.
  • I am submitting modifications to CEP XX.
  • Something else: (add your description here).

Checklist for CEP approvals

  • The vote period has ended and the vote has passed the necessary quorum and approval thresholds.
  • A new CEP number has been minted. Usually, this is ${greatest-number-in-main} + 1.
  • The cep-XXXX.md file has been renamed accordingly.
  • The # CEP XXXX - header has been edited accordingly.
  • The CEP status in the table has been changed to approved.
  • The last modification date in the table has been updated accordingly.
  • The table in the README has been updated with the new CEP entry.
  • The pre-commit checks are passing.

Comment thread cep-XXXX.md Outdated
Comment on lines +139 to +159
- `checksum`: Optional qualifier, with no default value. If provided, its value MUST consist of
one or more checksum specifications, with consecutive checksum specifications separated by a
single, unencoded ASCII "," (comma) character. Each checksum specification is defined as the
concatenating of the lowercase checksum algorithm name (e.g., "md5", "sha256"); a single,
unencoded ":" (colon) character; and the lowercase, hex-encoded checksum value.

The lowercase checksum algorithm name MUST only contain the ASCII lowercase characters `a-z` and
digits `0-9`. The recommended way to specify checksum algorithms whose names are commonly
written with upper case and/or non-alphanumeric characters such as dashes (e.g., "SHA-1",
"SHA-256") is to simply remove any non-alphanumeric characters in the commonly-written name and
lowercase the remaining string.

The lowercase hex-encoded checksum value MUST only contain the ASCII lowercase characters `a-f`
and digits `0-9`. The checksum value is explicitly understood to be a hexadecimal value, so
commonly-used prefixes and postfixes (e.g., "0x" and "_16", respectively) MUST NOT be included as
part of the checksum value.

Historically, the conda ecosystem has used the MD5 and SHA-256 algorithms for checksumming
packages; see, e.g., [CEP 16][CEP16], [CEP 32][CEP32], and [CEP 36][CEP36]. Given this and the
sub-optimal security properties of MD5, the RECOMMENDED algorithm for the `checksum` qualifier is
SHA-256.

@chenghlee chenghlee Apr 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having thought about it for a bit, I'm open to rewriting this checksum qualifier specification to only support MD5, SHA256, and/or [some other finite set of checksum algorithms], mostly so this and other CEPs don't have to think about support PURLs using, e.g., crc8 or xkcd221, as one of their named checksum algorithms.

- Add link to GitHub PR discussion
- Change wording from "Section" to "Clause" to match ECMA-427 language
- Properly escape an underscore

@jaimergp jaimergp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Cheng! I love to see such a thorough review of the PURL standards so we can submit edits to their team.

I added a few comments about typos and suggestions for the flow, but there's one point I want to emphasize: the version component must only be a literal. Anything else that may potentially identify more than one version needs to be in vers.

Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-0049.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
@mjherzog

mjherzog commented May 1, 2026

Copy link
Copy Markdown

@jaimergp @chenghlee The issue template for requesting changes to a registered PURL type is:
https://github.com/package-url/purl-spec/blob/main/.github/ISSUE_TEMPLATE/Change%20registered%20PURL%20type.md
It will appear as a template option when you create a New Issue.

- Provide an example in the "Motivation" section to clarify why the
  existing conda PURL specification is insufficient for the ecosystem
- Clarify wording for "scheme" and "type" components
- Simplify handling of "version" component and "vers" qualifiers by
  explicitly prohibiting their simultaneous use, rather than trying to
  define de-confliction/precedence rules.
- Fix various typos and minor language mistakes
Comment thread cep-XXXX.md Resolved

@beckermr beckermr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are many instances of must in the text that I think should be MUST. We should clean that up for clarity.

@baszalmstra

Copy link
Copy Markdown
Contributor

@chenghlee Are you still working on this? There are a number of review comments that seem unaddressed for a while. No rush, just checking the status. :)

@jaimergp

jaimergp commented Aug 6, 2026

Copy link
Copy Markdown
Member

@conda/steering-council, the RFC period has officially opened for this CEP. It will last two weeks, so please place your comments before 2026-08-20 EOD AoE. In there are no blocking concerns, a vote will start immediately after the RFC period.

@jaimergp jaimergp added the rfc Request for comments period to wrap up the discussion before starting a vote. label Aug 6, 2026

@jaimergp jaimergp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent CEP, @chenghlee. I did a more thorough pass and came up with some suggestions. My two main concerns are:

  • PURLs can be used to identify package requirements (e.g. as we are trying to do in PEP 725 / 804), so I'm not sure there's much value in forbidding virtual packages here.
  • The version field should be a literal string, to be processed with exact equality only. All other use cases (trailing zeros, globs, ranges, etc) belong in vers.

I'm also curious: what happens in the PURL spec body refuses to accept some of these decisions? Do we withdraw the CEP and try again? Update it? What's the intended lifecycle once approved? Do we defer to future revisions of the PURL spec if there are conflict with this (historic) document?

On the editorial side, I've observed some instances of [emphasis], double space after period, and double newline before headings. Those have not been common in previous CEPs, and I don't feel particularly strongly about it, but if you don't care either, let's make it consistent: _emphasis_, single-space after period, single newline before headings.

Comment thread cep-XXXX.md Resolved
Comment thread cep-0049.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-0049.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
- Single space after periods and other punctuations
- Single newline between section headers
- Use `(...)` rather than `[...]` for parentheticals (and made most
  parentheticals not that).
@chenghlee

Copy link
Copy Markdown
Contributor Author

I'm also curious: what happens in the PURL spec body refuses to accept some of these decisions? Do we withdraw the CEP and try again? Update it? What's the intended lifecycle once approved? Do we defer to future revisions of the PURL spec if there are conflict with this (historic) document?

Honestly, I don't know. I guess the conda steering council could decide what should happen, depending on the extent of rejections and/or the specific changes made to PURL spec in the future. I suppose "minor" edits or clarifications could be made via PRs to this CEP, and anything "substantive" would require one or more new CEPs that clarify or supersede this one.

On the editorial side, I've observed some instances of [emphasis], double space after period, and double newline before headings. Those have not been common in previous CEPs, and I don't feel particularly strongly about it, but if you don't care either, let's make it consistent: emphasis, single-space after period, single newline before headings.

Double spaces and newlines just made it easier for me to read in my editor; I'm not particularly opinionated about the style, so I've modified the text to follow the styles used in other CEPs. (I was using [...] for parentheticals, not emphasis, which I guess in standard written English is done via (...), and in any case, I've removed all but one of the parentheticals.)

Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
Comment thread cep-XXXX.md Resolved
@jaimergp

Copy link
Copy Markdown
Member

@conda/steering-council, gentle reminder <3

@msarahan

Copy link
Copy Markdown
Contributor

PURLs are great. This is a very good direction. I have been using PURLs for tasks such as detecting false positives from CVE scans. Most CVE records are not including PURL relationships, but I've been manually augmenting our database with them. I've been associating them primarily by source code location. For example, I have https://openhub.net/vulnerabilities/bdsa/BDSA-2026-16119 associated with the purl "pkg:github/python/cpython", and then on the other side, I have the conda package name "python" or "cpython" mapped to the same purl. A mismatch of these two sides helps me exclude false positives.

Conda packages are part of the story, but they're also a container for other things, and the identity of the stuff inside the container is often just as important as the container (and its implied build details) are.

Does that fit somewhere in this CEP, or is it a separate (perhaps not even a Conda-related) issue?

Based on review feedback and specifications in other CEPs.
Specifically, use "hexadecimal" rather than "hex-encoded", as the latter
might be a bit ambiguous as to whether it means "hex digit" or "encoding
to a Unicode code point".
Realized we need to support '-' (or really, any other delimiter-shaped
character) in the checksum name to prevent "ambiguities" like "SHA3-512"
becoming "sha3512".  Chose the '-' and only the '-' since it already
occurs in a lot of algorithm name but doesn't require us to invoke
percent-encoding rules; no on really wants `sha-512%2F224`.
But defer the actual specification because that gets messy...
There's been discussion of having additional examples in this CEP, and
some of those might not be good candidates for inclusion in the PURL
schema, as either they risk the schema excessively long, or they are not
allowed in a PURL specification (e.g., examples of invalid PURLs).
Comment thread cep-XXXX.md Resolved
@jaimergp
jaimergp requested a review from beckermr September 2, 2026 15:15
@jaimergp
jaimergp dismissed beckermr’s stale review September 2, 2026 15:16

All the relevant "must" occurrences are now clear, in my opinion.

@jaimergp

jaimergp commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

Dear @conda/steering-council,

The vote for this CEP has started. It will be open for two weeks, until September 16th, 2026, 23:59 Anywhere on Earth. This time period has been chosen to make it eligible for time-out rules. As an Enhancement Proposal vote, it requires 60% affirmative votes to pass.

To vote, please mark the relevant checkbox under your username:

@chenghlee chenghlee added vote Voting following governance policy and removed rfc Request for comments period to wrap up the discussion before starting a vote. labels Sep 3, 2026
@jaimergp

jaimergp commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

@conda/steering-council mid period reminder; cc @mariusvniekerk, @marcelotrevisani, @msarahan, @jakirkham

@jaimergp

Copy link
Copy Markdown
Member

Vote has closed, results are in: the CEP has passed!

  • SC size: 13
  • Votes: 11 (84.6% of SC)
    • Yes: 11 (100% of votes)
    • No: 0
    • Abstain: 0

@conda/steering-council, this will be minted as CEP 49.

@jaimergp jaimergp changed the title CEP XXXX: Defining Package-URLs (PURLs) for conda packages CEP 49: Defining Package-URLs (PURLs) for conda packages Sep 23, 2026
@jaimergp jaimergp changed the title CEP 49: Defining Package-URLs (PURLs) for conda packages CEP 49: Package-URLs (PURLs) for conda packages Sep 23, 2026
@jaimergp
jaimergp merged commit f484b3b into conda:main Sep 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vote Voting following governance policy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants