Skip to content

Fix GitHub Actions token authentication#248

Open
gmackie wants to merge 2 commits into
UpliftGames:mainfrom
gmackie:fix/github-actions-token-auth
Open

Fix GitHub Actions token authentication#248
gmackie wants to merge 2 commits into
UpliftGames:mainfrom
gmackie:fix/github-actions-token-auth

Conversation

@gmackie
Copy link
Copy Markdown

@gmackie gmackie commented Jan 17, 2026

Summary

Fixes #238 - GitHub Actions tokens now work for publishing packages.

Problem

When using wally publish with GitHub Actions tokens (or PATs/fine-grained PATs), the registry returned:

Error: 422 Unprocessable Entity
{"message":"Github auth failed because: 404 Not Found"}

This happened because the /applications/{client_id}/token endpoint returns 404 for tokens not issued by the OAuth app, even though they're valid GitHub tokens.

Solution

  • When the OAuth app verification endpoint returns 404, we now accept the token since we already verified it works with the /user endpoint
  • This enables GitHub Actions tokens, Personal Access Tokens (PATs), and fine-grained PATs to work for publishing

Changes

  • Accept 404 from OAuth app verification as valid (token works but wasn't issued by OAuth app)
  • Refactored auth module into auth/mod.rs + auth/tests.rs for better organization
  • Added unit tests for scope/org permission checks

Testing

  • All existing tests pass
  • New unit tests added for permission verification logic

gmackie and others added 2 commits January 17, 2026 14:17
Accept tokens that fail OAuth app verification but pass /user endpoint.
This enables GitHub Actions tokens, PATs, and fine-grained PATs to work
for publishing packages.

When the /applications/{client_id}/token endpoint returns 404, the token
wasn't issued by our OAuth app but is still valid for GitHub API access.
We now accept these tokens since we already verified them with /user.

Also refactored auth module into auth/mod.rs + auth/tests.rs for better
organization and added unit tests for scope/org permission checks.
Security upgrade addressing CVE-2025-55182 (Critical RCE),
CVE-2025-29927 (middleware auth bypass), CVE-2026-23864 (DoS),
and CVE-2025-55183 (source exposure). Also upgrades React,
eslint-config-next, and related @next/* packages where needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Error: 422 Unprocessable Entity; Github auth failed because: 404 Not Found

1 participant