-
Notifications
You must be signed in to change notification settings - Fork 925
ci: build base template via e2b CLI in addition to DockerHub push #1401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8ef1cd6
ee86f02
7f29aeb
5d9204c
d7a7776
fbe6304
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: 'Build and install E2B CLI' | ||
| description: >- | ||
| Builds the e2b CLI from source in this repo and installs it globally so the | ||
| `e2b` command is available on PATH. Assumes the repository has already been | ||
| checked out. | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Parse .tool-versions | ||
| uses: wistia/parse-tool-versions@v2.1.1 | ||
| with: | ||
| filename: '.tool-versions' | ||
| uppercase: 'true' | ||
| prefix: 'tool_version_' | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: '${{ env.TOOL_VERSION_PNPM }}' | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: '${{ env.TOOL_VERSION_NODEJS }}' | ||
| cache: pnpm | ||
| cache-dependency-path: pnpm-lock.yaml | ||
|
|
||
| - name: Install dependencies | ||
| shell: bash | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build the CLI | ||
| shell: bash | ||
| run: pnpm build | ||
| working-directory: ./packages/cli | ||
|
|
||
| - name: Install the CLI globally | ||
| shell: bash | ||
| run: npm install -g . | ||
| working-directory: ./packages/cli | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,12 +12,12 @@ permissions: | |
| contents: read | ||
|
|
||
| jobs: | ||
| buildAndPublish: | ||
| buildAndPushImage: | ||
|
mishushakov marked this conversation as resolved.
|
||
| defaults: | ||
| run: | ||
| working-directory: ./templates/base | ||
|
|
||
| name: Build and Push Images | ||
| name: Build and Push Image to DockerHub | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Checkout repository | ||
|
|
@@ -39,3 +39,19 @@ jobs: | |
| --platform linux/amd64,linux/arm64 \ | ||
| --push \ | ||
| --tag ${{ secrets.DOCKERHUB_USERNAME }}/base:latest . | ||
|
|
||
| buildTemplate: | ||
| name: Build and Publish E2B Template | ||
| runs-on: ubuntu-22.04 | ||
| env: | ||
| E2B_API_KEY: ${{ secrets.E2B_API_KEY }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Build and install E2B CLI | ||
| uses: ./.github/actions/build-cli | ||
|
|
||
| - name: Build and publish base template | ||
| working-directory: ./templates/base | ||
| run: e2b template create base --memory-mb 512 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Agentic Security Review
Impact: CI supply-chain compromise in an earlier step can exfiltrate template-publishing credentials and enable unauthorized template publication/API actions. Reviewed by Cursor Security Reviewer for commit 7f29aeb. Configure here. |
||
This file was deleted.


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Agentic Security Review
Severity: HIGH
This workflow executes
wistia/parse-tool-versions@v2.1.1by mutable tag inside a job that later uses E2B publishing credentials. Tag retarget or upstream compromise would allow attacker-controlled code to run in CI and steal those credentials.Impact: A supply-chain compromise of the action can lead to unauthorized template publication/API usage via exfiltrated secrets.
Reviewed by Cursor Security Reviewer for commit 7f29aeb. Configure here.