feat: add package trusted publishing via GitHub OIDC#1461
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9bcda667e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Greptile SummaryThis PR introduces full end-to-end trusted publishing via GitHub Actions OIDC: a new The implementation is well-structured: OIDC verification is thorough (issuer, audience, time window, signature, repository/owner ID pinning, workflow filename extraction, reusable-workflow rejection), schema changes are additive, access control gating ( Key points to address before shipping:
Confidence Score: 4/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: convex/lib/githubActionsOidc.ts
Line: 155-157
Comment:
**`workflow_dispatch`-only restriction blocks common CD patterns**
The check `eventName !== "workflow_dispatch"` means trusted publishing is unavailable for the most common release trigger patterns: tag pushes (`on: push: tags: ['v*']`), GitHub release creation (`on: release: types: [created]`), and scheduled releases (`on: schedule`). In practice, most CD pipelines publish on these events, not on manual dispatch.
If this is intentional (friction to require a human trigger), it should be documented in the API error message and in user-facing docs so CI authors aren't surprised. If it is meant to be relaxed later, a comment here would help. Consider whether `push` to a protected branch/tag pattern — still verified against a named GitHub environment — is a safe enough signal to allow through.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: convex/packages.ts
Line: 1894-1910
Comment:
**Publish token is never revoked after a successful publish**
After `publishPackageImpl` returns successfully, the `packagePublishTokens` record is not revoked (`revokedAt` remains unset). The token stays valid for the full 15-minute window. An actor who obtained the token (from CI logs, environment variable dumps, etc.) can attempt further publish calls using the same token within that window.
Although the version-binding check (`auth.publishToken.version !== version`) and the version-uniqueness constraint in the DB limit the blast radius (a second publish for the same version will be rejected), the single-use guarantee expected of short-lived publish tokens is not enforced. Revoking the token immediately after a successful return from `publishPackageImpl` (or within `insertReleaseInternal` after the DB insert) would close this gap. If retrying failed publishes within the window is a desired UX, the token could alternatively be revoked only after a version-uniqueness error is returned — but a hard revoke-on-success is simpler and safer.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "feat: add package trusted publishing via..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3cb9991947
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9580161641
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 053bc1eea1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Follow-up on the bot summary comments:
|
|
Final maintainer note: What changed
Local validation
Notes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0cb0db9786
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Follow-up is done. Latest fixes:
Validation:
Current PR state:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3d2baa6d0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const response = await fetchImpl(`https://api.github.com/repos/${normalizedRepository}`, { | ||
| headers: { | ||
| Accept: "application/vnd.github+json", | ||
| "User-Agent": "clawhub/package-trusted-publisher", | ||
| }, |
There was a problem hiding this comment.
Support private repos when resolving trusted publisher identity
Trusted publisher setup currently calls GitHub’s repo API without authentication, so private repositories return 404 and cannot be configured even though they can run GitHub Actions OIDC. This blocks trusted publishing for private-source/private-package workflows in production; the identity lookup should use authenticated GitHub access or avoid requiring a public repo lookup at setup time.
Useful? React with 👍 / 👎.
f3d2baa to
effd5cd
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: effd5cd72c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd067f6b2e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Summary
officialseparate from publish auth, and record publish actor plus audit dataTesting
Notes
convex/_generated/api.d.tswas not regenerated locally because this checkout has no working Convex deployment configured