Skip to content

CEP 50: Distribution of Sigstore Attestations for Conda Packages - #142

Merged
jaimergp merged 18 commits into
conda:mainfrom
wolfv:serving-attestations
Sep 23, 2026
Merged

jaimergp merged 18 commits into
conda:mainfrom
wolfv:serving-attestations

Conversation

@wolfv

@wolfv wolfv commented Dec 10, 2025 •

Copy link
Copy Markdown
Contributor

This CEP adds specifications how to serve sigstore attestations in Conda repositories.

A preview implementation is available on beta.prefix.dev under the following URL:

https://beta.prefix.dev/wolf-channel/linux-64/signed-package-1.2.1-hb0f4dca_0.conda.v0.sigs

Checklist for submitter

  • I am submitting a new CEP: Put your title here.
    • 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.
    • The PR title reflects the CEP I'm modifying: CEP XX: Amend XYZ.
    • I updated the "Updated" date.
    • I added the link of this PR to the Discussions row.
    • I added or extended the ## Changelog section right above the final "Copyright" section with an item that uses syntax YYYY-MM-DD: Brief explanation of changes.
  • 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.

@wolfv
wolfv marked this pull request as draft December 10, 2025 16:13
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Outdated
Comment on lines +169 to +175
A package MAY have multiple attestations from different sources. Common scenarios include:

| Source | Purpose |
|--------|---------|
| Build system (e.g., GitHub Actions) | Proves the package was built from specific source code |
| Channel operator | Proves the channel accepted and published the package |
| Third-party auditor | Proves the package passed security review |

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.

I would remove the "common scenarios" here, or maybe reword it as a list of examples of potential future usecases.

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.

this has not been addressed yet

Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved

@evankanderson evankanderson left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I swung by, since this got posted to the OpenSSF #general channel, and I was curious. Feel free to disregard.

Comment thread cep-xxxx-serving-attestations.md Outdated

1. **Enables client verification**: Clients can fetch attestations alongside packages and verify them before installation.

2. **Supports multiple attestations**: A single package may have multiple attestations (e.g., from the build system, from the channel on upload, from third-party auditors).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

While this CEP describes the endpoint as "RESTful", it seems like it may be a read-only endpoint?

If you want to support additional attestations from third-parties, you'll need to figure out access control for users "vouching" for other packages. That seems like a diversion from the main goal of this CEP, so it might be worth calling out third-party auditors as a future capability that you don't want to prevent.

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.

While this CEP describes the endpoint as "RESTful", it seems like it may be a read-only endpoint?

These are not in contradiction, right?

If you want to support additional attestations from third-parties, you'll need to figure out access control for users "vouching" for other packages. That seems like a diversion from the main goal of this CEP, so it might be worth calling out third-party auditors as a future capability that you don't want to prevent.

Not necessarily? A third party could generate attestations, and a channel admin could upload them to their respective packages, without giving access to the third party. This section is characterizing the distribution mechanism, the "attestations from third-party auditors" is just an example of a type of attestation that may exist.

Comment thread cep-xxxx-serving-attestations.md Outdated
Comment on lines +159 to +161
"attestations": "37517e5f3dc66819f61f5a7bb8ace1921282415f10551d2defa5c3eb0985b570"
}
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm assuming this is because of the discussion here: https://github.com/conda/ceps/pull/142/changes#r2816839339

It might be worth a sentence here to suggest the rationale:

Suggested change
"attestations": "37517e5f3dc66819f61f5a7bb8ace1921282415f10551d2defa5c3eb0985b570"
}
```
"attestations": "37517e5f3dc66819f61f5a7bb8ace1921282415f10551d2defa5c3eb0985b570"
}
\```
The signatures hash enables mirrors to detect and re-fetch signature bundles as they are added to the repo.

(GitHub suggestions can't include the close-block, so I had to escape it. 😢 )

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.

+1

Comment thread cep-xxxx-serving-attestations.md Outdated

Each attestation in the response MUST comply with [CEP 27]. Specifically:

1. The in-toto statement's `subject[0].name` MUST match the artifact filename.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Does this need to be subject[0].name? I'm imagining that I might have a CI process which produces an attestation for all the artifacts produced in a single attestation, so I have N+1 outputs, rather than 2N outputs. Should 1. and 2. be changed to "One of the attestation subjects MUST match as follows: (a) subject[N].name MUST match the artifact filename AND (b) `subject[N].digest.sha256 MUST match the SHA256 hash of the artifact"?

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.

The reason for this is that having one attestation per artifact makes things simpler from a verification POV, and also prevents certain footguns (more context here)

Comment thread cep-xxxx-serving-attestations.md Outdated
Comment on lines +228 to +230
| `require` | `error` | Fail if attestations are missing or invalid |
| | `warn` | Log warning but continue if attestations are missing or invalid |
| | `ignore` | Silently continue (still verify if attestations exist) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is there a default value for require (or the other settings)? In the example, require is omitted for the "foobar" repository.

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.

I vote for making the 3 fields mandatory, with no default values

Comment thread cep-xxxx-serving-attestations.md Outdated

1. **Download package** from the channel
2. **Fetch attestations** from `<package_url>.sigs`
3. **Verify each attestation** against the configuration.

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.

make explicit that the verification process is defined in CEP-27

Comment thread cep-xxxx-serving-attestations.md Outdated
For offline verification, clients MAY cache `.sigs` files alongside packages in local repositories.
The Sigstore bundle format is self-contained and supports offline verification once the Sigstore trust root is available locally.

Note: clients MUST periodically update the sigstore trust root to ensure no keys were revoked.

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.

the reason is more general, it's to ensure the client doesn't miss any trust root changes (which could be key revocation, but also new keys added)

Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Resolved
Comment thread cep-xxxx-serving-attestations.md Outdated
| --------------- | ------------------------------------------------------------ |
| `200 OK` | Attestations returned successfully (may be empty array) |

Channels that support attestations MUST always return `200 OK` with an empty array `[]`, even when the package does not exist.

@facutuesca facutuesca Apr 14, 2026 •

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.

My previous comment was about the ambiguity of defining a 404 error on the .sigs endpoint as "this package does not exist", when channels that don't implement this CEP would return 404 on the .sigs endpoint for every package.

I think we should return 404 when the package does not exist, but define the meaning of 404 as:

  • For channels implementing this CEP, 404 means the package does not exist
  • For channels not implementing this CEP, .sigs always returns 404

and make it clear that clients should not use the .sigs endpoint to determine if a package exists or not

@wolfv
wolfv marked this pull request as ready for review May 28, 2026 06:29
Comment thread cep-0050.md
rules specified by any of the other all-capital terms MAY result in a warning, at discretion of the
implementation.

## Abstract

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.

Maybe we should update the abstract, since the CEP defines both the endpoint to distribute the attestations but also the new configuration clients should use to consume them.

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.

Done.

Comment thread cep-XXXX.md Outdated
Comment on lines +18 to +20
> More specifically, violations of a MUST or MUST NOT rule MUST result in an error. Violations of the
rules specified by any of the other all-capital terms MAY result in a warning, at discretion of the
implementation.

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.

any particular reason for adding this?

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.

I think this was copied from the template :)

Comment thread cep-XXXX.md Outdated
1. **Discovery**: Clients learn from repodata alone whether a `.sigs` file exists, avoiding a network round-trip for packages without attestations.
2. **Integrity**: Clients MUST verify that the fetched `.sigs` bytes hash to `sha256` before using the sidecar (see [Verification Workflow](#verification-workflow)). This prevents a mirror or intermediary from stripping or replacing attestations without detection.
3. **Change detection**: When attestations are added after a package was first published, the channel publishes an updated `.sigs` file and updates the field. Mirrors and clients re-fetch the sidecar when the hash changes.
4. **Resource bounds**: `size` allows clients to enforce a download limit before fetching. Clients MAY refuse to download sidecars larger than a locally configured limit; such a refusal MUST be handled like a retrieval failure (see [Configuration](#configuration)).

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.

does this new size field add extra protection? AFAICT, the way the CEP says to use it is for clients to not download the .sigs file if the size field exceeds some limit.

What is it protecting against?

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.

I think it can help against accidentally downloading too large blobs (which could be a DOS for improper configured clients). Also helps with displaying a nice progress bar :) But not a huge security win.

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.

Are we talking about maliciously crafted blobs, which are big on purpose to cause a DOS? Or legitimate normal-sized blobs, which might be too big for a resource-constrained client?.

In the former case, the channel could check and reject attestations that exceed a reasonable size.

In the latter case, these are usually files in the tens of Kb. Is that still a concern?

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.

Removed size again, changed the key to attestations_sha256.

Comment thread cep-XXXX.md Outdated

Each entry is a pattern matched against the certificate identity (the SubjectAlternativeName of the Sigstore signing certificate). Matching is case-sensitive and literal, except that `*` matches any sequence of characters, including `/`.
For example, `https://github.com/conda-forge/*` matches `https://github.com/conda-forge/numpy-feedstock/.github/workflows/build.yml@refs/heads/main` but not `https://github.com/conda-forge-evil/...`, because the literal prefix includes the trailing slash.
A future revision of this CEP MAY extend entries to additionally pin the OIDC issuer.

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.

the configuration should include the issuer in some form. (issuerA, identityA) is different from (issuerB, identityA), and we should not allow both when identityA is specified.

Also, the paragraph below:

Sigstore verification binds each attestation to a signing identity. An attacker cannot forge attestations for identities they do not control, but an attacker who controls the distribution path can substitute attestations signed by an identity they do control. The trusted_identities policy is what turns bundle verification into a guarantee about who produced the package.

The policy is a guarantee about who produced the package only if we also check the OIDC issuer.

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.

I removed all this but we'll keep it in mind for the client implementation(s).

Comment thread cep-XXXX.md Resolved
Co-authored-by: Travis Hathaway <[email protected]>

@baszalmstra baszalmstra 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.

A big gap I see with this proposal is how this should be handled in lock-files. Given that .sigs is not immutable should we store the attestation sha256 in the lock-file as well. But what happens if on the server/mirror the .sigs are updated? Should we store the original .sigs in the lock-file?

Comment thread cep-XXXX.md Outdated

### Response Format

The `.sigs` file MUST contain a JSON array of one or more [Sigstore bundles][Sigstore Bundle]. Each bundle represents one attestation for the package.

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.

Why an json array instead of a jsonl?

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.

Both are fine with me. I think JSON array is slightly easier to parse with standard JSON decoders.

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.

I kept it a JSON array ... I don't really mind either way but JSONL is IMO not as easy to parse (still very reasonably easy though).

Comment thread cep-XXXX.md Outdated
The field is the single discovery and integrity mechanism for attestation sidecars:

1. **Discovery**: Clients learn from repodata alone whether a `.sigs` file exists, avoiding a network round-trip for packages without attestations.
2. **Integrity**: Clients MUST verify that the fetched `.sigs` bytes hash to `sha256` before using the sidecar (see [Verification Workflow](#verification-workflow)). This prevents a mirror or intermediary from stripping or replacing attestations without detection.

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.

If the mirror or intermediary has access to the channel they can also just change the repodata itself no?

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.

yeah I think that is a different problem that we need to tackle in other ways. It also depends heavily on the channel.

For example if the channel is my-company then I could state that I expect all publisher attestations to come from github.com/my-company

At that point it becomes a lot more difficult for a mirror to fake this as they would have had to take over my-company. A mirror could totally omit the signatures though. We'd rely on the client configuration to enforce this trust.

@facutuesca

Copy link
Copy Markdown
Contributor

A big gap I see with this proposal is how this should be handled in lock-files. Given that .sigs is not immutable should we store the attestation sha256 in the lock-file as well. But what happens if on the server/mirror the .sigs are updated? Should we store the original .sigs in the lock-file?

IMO lockfiles should lock the trusted identities, not the hashes of the attestations or .sigs responses. With regards to the gap, this proposal started as a spec to serve the attestations. Maybe lockfile changes could be done in a separate one?

@wolfv

wolfv commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

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

@Callek

Callek commented Aug 27, 2026

Copy link
Copy Markdown

I’m wondering whether coordination of attestation updates is intentionally left out of scope here.

For a static channel, a package and its CEP 27 attestation may be handled in separate steps. conda-index generates the package’s repodata record from the package metadata, but does not currently discover a neighboring .sigs file or populate attestations_sha256. Something outside the normal indexing process therefore needs to create the sidecar and ensure that the corresponding field is included in repodata.

There is also a concurrency question when multiple attestations are added. Because the sidecar is an array and attestations_sha256 identifies the entire serialized sidecar, each addition produces a new aggregate sidecar. If two additions are processed concurrently from the same existing sidecar, they could produce competing successors, with whichever update wins potentially omitting the other attestation. The immutable URLs prevent cache races for published revisions, but do not by themselves prevent this kind of lost update.

The CEP specifies the order in which a completed replacement sidecar and its repodata update are published, but not how additions are serialized or merged before that point. Is that deliberately left entirely to channel implementations? If so, would it be worth stating that explicitly? Alternatively, does the specification need to define any consistency guarantee—for example, that concurrently accepted attestations must not be lost—without prescribing a particular upload API or storage implementation?

jezdez added a commit to conda-incubator/conda-sigstore that referenced this pull request Aug 27, 2026
@wolfv

wolfv commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Indeed, it makes sense to clarify a serialization order to keep sha256 hashes stable. We could order them by logIndex, timestamp, or some other property.

Concurrency issues / attestation append issues are indeed left to the indexing implementation. E.g. for rattler index we would probably suggest to have a sigs folder next to the packages, where attestations are stored with <package-name>.N.sig.json which are then used in the indexing step (N for the index of the attestation).

However, on a real server this will probably look a bit different.

Address review feedback on attestation ordering: the sidecar array is
append-only in acceptance order, with a content-hash sort as fallback
for channels without an acceptance record. Require that concurrently
accepted attestations are not lost while leaving the merge mechanism
to channel implementations. Tighten the CEP 27 cross-reference and
drop an em dash.
@wolfv
wolfv force-pushed the serving-attestations branch from c05bd11 to 241d1cf Compare September 9, 2026 15:59
@wolfv

wolfv commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

@conda/steering-council

The RFC period has ended, and I’m opening the vote on Distribution of Sigstore Attestations for Conda Packages.

This vote falls under the Enhancement Proposal Approval policy. It requires participation from at least 8 of the 13 active Steering Council members (60% quorum), with at least 60% of non-abstaining votes voting yes to pass. Abstentions count toward quorum.

To vote, please select exactly one checkbox under your name below, or leave a comment with yes, no, or abstain. Questions and review comments are welcome.

This vote will end on 2026-09-16, End of Day, Anywhere on Earth (AoE).

Votes

@baszalmstra (Bas Zalmstra)

  • yes
  • no
  • abstain

@chenghlee (Cheng H. Lee)

  • yes
  • no
  • abstain

@ocefpaf (Filipe Fernandes)

  • yes
  • no
  • abstain

@Hind-M (Hind Montassif)

  • yes
  • no
  • abstain

@jaimergp (Jaime Rodríguez-Guerra)

  • yes
  • no
  • abstain

@jezdez (Jannis Leidel)

  • yes
  • no
  • abstain

@jakirkham (John Kirkham)

  • yes
  • no
  • abstain

@marcelotrevisani (Marcelo Duarte Trevisani)

  • yes
  • no
  • abstain

@mariusvniekerk (Marius van Niekerk)

  • yes
  • no
  • abstain

@msarahan (Michael Sarahan)

  • yes
  • no
  • abstain

@pavelzw (Pavel Zwerschke)

  • yes
  • no
  • abstain

@xhochy (Uwe Korn)

  • yes
  • no
  • abstain

@wolfv (Wolf Vollprecht)

  • yes
  • no
  • abstain

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

wolfv commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Final reminder @msarahan @jakirkham

@jaimergp

jaimergp commented Sep 23, 2026 •

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: 10 (100% of votes)
    • No: 0
    • Abstain: 1

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

@jaimergp jaimergp changed the title CEP about serving sigstore attestations in Conda repositories CEP 50: Distribution of Sigstore Attestations for Conda Packages Sep 23, 2026
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