Skip to content

fix(publish): fix "Invalid symbol 45" error when publishing with provenance - #37154

Open
jhnns wants to merge 1 commit into
denoland:mainfrom
jhnns:fix/publish-provenance-jwt-base64url
Open

jhnns wants to merge 1 commit into
denoland:mainfrom
jhnns:fix/publish-provenance-jwt-base64url

Conversation

@jhnns

@jhnns jhnns commented Nov 9, 2026

Copy link
Copy Markdown

deno publish fails after uploading the package with Invalid symbol 45, offset N. when generating provenance in GitHub Actions. The package is published, but the command exits 1 and no provenance is recorded.

Cause

extract_jwt_subject decodes the OIDC token payload with STANDARD_NO_PAD, but JWT segments are base64url (RFC 7519). The two alphabets differ in +/ vs. -_, so any token whose encoded payload contains - or _ is rejected (45 is -).

This is triggered when the workflow name: contains emoji: the workflow claim then contains UTF-8 bytes that base64url-encode to - (e.g. 🚀 → 8J-agA). For a given workflow the claim offsets are essentially fixed, so such workflows fail on every run.

Fix

Decode with URL_SAFE_NO_PAD. Adds a unit test using a token whose payload contains - (workflow name 🧪 Test and 🚀 Release).

References


🤖 Disclosure: this PR (the code change, test and description) was generated with Claude Code and reviewed by a human before submission.

…enance

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jhnns
jhnns force-pushed the fix/publish-provenance-jwt-base64url branch from e26acce to 4317d9b Compare November 9, 2026 14:08
@jhnns
jhnns marked this pull request as ready for review November 9, 2026 14:09
@CLAassistant

CLAassistant commented Nov 9, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This branch has not been deployed

No deployments
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