feat: make GitHub tokenless auth more secure#301
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a more secure GitHub Actions “tokenless” authentication path by exchanging a derived GitHub-run-scoped bearer payload for a short-lived Argos token, instead of using the tokenless payload directly as an Argos token.
Changes:
- Add a Core implementation to build a GitHub Actions tokenless bearer payload and exchange it via a new Argos API endpoint for a short-lived token.
- Update auth resolution priority to use the tokenless exchange after OIDC when
ARGOS_TOKENis not set. - Add unit tests, CLI e2e coverage, API client schema updates, and CI workflow coverage for the new flow.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/github-actions-tokenless.ts | New tokenless bearer builder + exchange call to obtain a short-lived Argos token. |
| packages/core/src/github-actions-tokenless.test.ts | Unit tests for availability detection, payload encoding, and exchange error handling. |
| packages/core/src/auth.ts | Switch from deprecated tokenless fallback to tokenless exchange in token resolution. |
| packages/core/src/auth.test.ts | Update auth tests to assert exchange-based behavior and payload contents. |
| packages/core/mocks/oidc.ts | Extend MSW handlers to mock the tokenless exchange endpoint. |
| packages/cli/vitest.config.ts | Add tokenless test tag metadata for CLI e2e suite. |
| packages/cli/package.json | Add e2e-tokenless script and exclude tokenless tests from default e2e. |
| packages/cli/e2e/upload-tokenless.test.js | New CLI e2e test covering tokenless authentication upload path. |
| packages/api-client/src/schema.ts | Add OpenAPI schema for /auth/github-actions/tokenless/exchange. |
| .github/workflows/ci.yml | Add a CI job to run the tokenless upload e2e test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.