Skip to content

fix(ci): use E2B_API_KEY instead of deprecated E2B_ACCESS_TOKEN - #321

Merged
mishushakov merged 1 commit into
mainfrom
san-salvador
Aug 5, 2026
Merged

fix(ci): use E2B_API_KEY instead of deprecated E2B_ACCESS_TOKEN#321
mishushakov merged 1 commit into
mainfrom
san-salvador

Conversation

@mishushakov

Copy link
Copy Markdown
Member

The cleanup-build-template job was the last place in CI still authenticating with an access token, and it started failing with [401] unauthorized: Invalid Access tokenE2B_ACCESS_TOKEN is deprecated and no longer accepted.

This switches cleanup_build_template.yml to take an E2B_API_KEY secret instead of E2B_TESTS_ACCESS_TOKEN, and updates pull_request.yml to pass secrets.E2B_API_KEY through — the same key that builds the template, so it has the right team scope. Verified against @e2b/cli@2.16.1 that template delete authenticates via X-API-KEY from E2B_API_KEY, so no access token is needed.

E2B_ACCESS_TOKEN is now gone from the repo entirely; the E2B_TESTS_ACCESS_TOKEN repo secret is unreferenced and can be deleted.

🤖 Generated with Claude Code

The cleanup-build-template job was the last place still authenticating
with an access token, and it started failing with:

  [401] unauthorized: Invalid Access token
  E2B_ACCESS_TOKEN is deprecated and no longer accepted.

Switch the cleanup workflow to E2B_API_KEY, matching every other job.
The same key builds the template, so it has the right team scope.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@cla-bot cla-bot Bot added the cla-signed label Aug 5, 2026
@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Workflow-only secret rename and env var change; no application or security logic touched.

Overview
Fixes CI cleanup failures caused by E2B rejecting deprecated access tokens ([401] unauthorized: Invalid Access token).

The reusable Cleanup Build Template workflow now requires E2B_API_KEY instead of E2B_TESTS_ACCESS_TOKEN, and the delete step sets E2B_API_KEY for the CLI (replacing E2B_ACCESS_TOKEN). The Pull Request workflow passes secrets.E2B_API_KEY into cleanup—the same key used for template build and SDK tests—so delete runs with consistent team scope.

E2B_ACCESS_TOKEN / E2B_TESTS_ACCESS_TOKEN are no longer referenced in the repo; the old repo secret can be removed.

Reviewed by Cursor Bugbot for commit ed0588f. Bugbot is set up for automated code reviews on this repo. Configure here.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM — straightforward CI fix, no application logic touched.

What was reviewed: confirmed E2B_ACCESS_TOKEN/E2B_TESTS_ACCESS_TOKEN have no remaining references in the repo, and that the new E2B_API_KEY secret is passed consistently with the pattern already used by the other jobs (build-template, js-sdk, python-sdk, performance-tests) in pull_request.yml.

Extended reasoning...

Overview

This PR touches two GitHub Actions workflow files: cleanup_build_template.yml and pull_request.yml. It renames the secret input from E2B_TESTS_ACCESS_TOKEN to E2B_API_KEY and swaps the env var passed to the e2b CLI from the deprecated E2B_ACCESS_TOKEN to E2B_API_KEY, matching how the other jobs in pull_request.yml already authenticate.

Security risks

None. This is a CI-only change with no application code touched. Secrets remain referenced via GitHub Actions secrets.* context and are not logged or exposed in plaintext anywhere in the diff. The change actually improves posture slightly by removing the last usage of a deprecated auth mechanism.

Level of scrutiny

Low. This is a mechanical, self-contained CI workflow fix that follows an established pattern already present in the same file (all four other jobs already pass secrets.E2B_API_KEY). The rationale is well-documented in the PR description, including verification against the specific @e2b/cli version's auth behavior.

Other factors

Cursor's bot review independently reached the same low-risk conclusion. No CODEOWNERS or critical application logic is involved, and the diff is minimal and easy to verify by inspection.

@mishushakov
mishushakov enabled auto-merge (squash) August 5, 2026 14:37
@mishushakov
mishushakov merged commit 8496ba8 into main Aug 5, 2026
17 checks passed
@mishushakov
mishushakov deleted the san-salvador branch August 5, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants