fix(ci): use E2B_API_KEY instead of deprecated E2B_ACCESS_TOKEN - #321
Conversation
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>
PR SummaryLow Risk Overview The reusable Cleanup Build Template workflow now requires
Reviewed by Cursor Bugbot for commit ed0588f. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
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.
The
cleanup-build-templatejob was the last place in CI 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.This switches
cleanup_build_template.ymlto take anE2B_API_KEYsecret instead ofE2B_TESTS_ACCESS_TOKEN, and updatespull_request.ymlto passsecrets.E2B_API_KEYthrough — the same key that builds the template, so it has the right team scope. Verified against@e2b/cli@2.16.1thattemplate deleteauthenticates viaX-API-KEYfromE2B_API_KEY, so no access token is needed.E2B_ACCESS_TOKENis now gone from the repo entirely; theE2B_TESTS_ACCESS_TOKENrepo secret is unreferenced and can be deleted.🤖 Generated with Claude Code