Repository navigation
ci: build the desktop template on every cluster (foxtrot, juliett, tango) - #260
devin-ai-integration[bot] wants to merge 5 commits into
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
❌ Cannot revive Devin session - the session is too old. Please start a new session instead. |
|
has conflicts |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0766d5d34e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| - name: Check the cluster API key | ||
| env: | ||
| CLUSTER: ${{ matrix.cluster }} | ||
| API_KEY_SECRET: ${{ matrix.api_key_secret }} | ||
| run: | |
There was a problem hiding this comment.
Check out before running in the template directory
Every matrix leg starts on a fresh runner, but the job-wide working-directory: ./template also applies to this first run step, before checkout has created that directory. GitHub requires the assigned working directory to exist before starting the shell, so all three template builds fail before the API-key check executes; move checkout ahead of this step or override this step's working directory. GitHub workflow syntax
Useful? React with 👍 / 👎.
…ngo) Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
0766d5d to
33eb360
Compare
| run: uv run python build_prod.py | ||
| # The template is built on every production cluster. Clusters are separate | ||
| # tenancies with separate template registries, so each needs its own build. | ||
| buildTemplate: |
There was a problem hiding this comment.
🔒 Agentic Security Review
Severity: MEDIUM
Description: buildTemplate runs on workflow_dispatch for whatever ref the caller selects, with production cluster API keys in the job environment and no GitHub Environment. GitHub executes the workflow file and commit from that ref, then poetry run python build_prod.py publishes alias desktop. A repository writer can push a non-main branch and dispatch it to read those keys and replace the production desktop template.
Impact: Push-triggered runs of this workflow are already limited to main, and buildAndPushImage refuses every non-push event. workflow_dispatch drops that gate. A writer who cannot land unreviewed code on main can still run branch-controlled code with E2B_API_KEY, E2B_JULIETT_API_KEY, and E2B_TANGO_API_KEY, exfiltrate them, and Template.build alias desktop onto e2b.dev, e2b-juliett.dev, and e2b-tango.dev. Because the selected ref's workflow file is what runs, that writer can also drop the DockerHub job's push-only guard and read DOCKERHUB_USERNAME and DOCKERHUB_TOKEN. Fork contributors without write cannot dispatch. An in-file if: github.ref == 'refs/heads/main' does not hold: the attacker deletes it on the branch. Reachability: exposure internal (repo write required), automatable yes (branch push plus the workflow dispatch API, secret names are in this file), technical_impact total (production credentials).
Remediation: Store the three cluster API keys in a GitHub Environment whose deployment branch policy allows only the protected main ref, and set environment: on buildTemplate so a non-main ref cannot receive them. Keep them out of repository-level secrets. Do not rely on if: github.ref == 'refs/heads/main' in this file: workflow_dispatch runs the workflow from the selected ref, so a writer can remove that condition. Removing workflow_dispatch also closes the path. Apply the same environment gate to DockerHub credentials if a dispatched ref must not be able to name them.
|
check security review above |
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
|
we will be moving it to customer templates |
Summary
The
desktoptemplate is now built on every production cluster — foxtrot, juliett and tango — instead of foxtrot only. Clusters are separate tenancies with separate template registries, so a template built on one does not exist on the others.template.ymlsplits into the DockerHub image job (unchanged, push-only) and abuildTemplatematrix job, one leg per cluster. The matrix holds{cluster, domain}; the API key is selected in the build step with static secret references, so the runner only receives these three keys (a dynamicsecrets[...]index would hand the job every org and repo secret):E2B_JULIETT_API_KEYandE2B_TANGO_API_KEYare new repo secrets and must be added before merging. A missing key fails that leg withMissing API key secret for cluster: <cluster>;fail-fast: falseso the other clusters still build.Also adds a bare
workflow_dispatchso the template can be rebuilt on all clusters without a template change (the Docker image only rebuilds onpush). Legs on the same cluster serialize viaTemplate-${{ github.ref }}-<cluster>; different clusters run in parallel. Both jobs use the uv setup from main.Merging this PR triggers the workflow (its path filter includes the workflow file), which will do the first juliett/tango builds.
Companion PR for the code-interpreter template: e2b-dev/code-interpreter#338.
Link to Devin session: https://app.devin.ai/sessions/e307a60ded5e4986a82930c5f7b8169e
Open in Devin Desktop: https://app.devin.ai/desktop/session/e307a60ded5e4986a82930c5f7b8169e?variant=devin
Requested by: @mishushakov