Skip to content

feat: make GitHub tokenless auth more secure#301

Merged
gregberge merged 5 commits into
mainfrom
improve-tokenless
May 11, 2026
Merged

feat: make GitHub tokenless auth more secure#301
gregberge merged 5 commits into
mainfrom
improve-tokenless

Conversation

@gregberge
Copy link
Copy Markdown
Member

No description provided.

@gregberge gregberge requested review from a team and Copilot May 11, 2026 08:19
@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
argos-js-sdk-reference Ready Ready Preview, Comment May 11, 2026 8:55am

Request Review

@gregberge gregberge requested review from jsfez and removed request for a team May 11, 2026 08:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_TOKEN is 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.

Comment thread packages/core/src/github-actions-tokenless.ts Outdated
Comment thread packages/core/src/github-actions-tokenless.ts
Comment thread packages/core/src/github-actions-tokenless.ts Outdated
@gregberge gregberge merged commit 41b62d0 into main May 11, 2026
69 checks passed
@gregberge gregberge deleted the improve-tokenless branch May 11, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants