Repository navigation
CEP 49: Package-URLs (PURLs) for conda packages - #159
Conversation
| - `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. |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
|
@jaimergp @chenghlee The issue template for requesting changes to a registered PURL type is: |
- 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
beckermr
left a comment
There was a problem hiding this comment.
There are many instances of must in the text that I think should be MUST. We should clean that up for clarity.
|
@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. :) |
|
@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
left a comment
There was a problem hiding this comment.
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.
- Single space after periods and other punctuations - Single newline between section headers - Use `(...)` rather than `[...]` for parentheticals (and made most parentheticals not that).
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.
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 |
|
@conda/steering-council, gentle reminder <3 |
|
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).
All the relevant "must" occurrences are now clear, in my opinion.
|
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:
|
|
@conda/steering-council mid period reminder; cc @mariusvniekerk, @marcelotrevisani, @msarahan, @jakirkham |
|
Vote has closed, results are in: the CEP has passed!
@conda/steering-council, this will be minted as CEP 49. |
Checklist for submitter
cep-0000.mdnamedcep-XXXX.mdin the root level.Checklist for CEP approvals
${greatest-number-in-main} + 1.cep-XXXX.mdfile has been renamed accordingly.# CEP XXXX -header has been edited accordingly.pre-commitchecks are passing.