-
-
Notifications
You must be signed in to change notification settings - Fork 424
feat: package into single binary #1735
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
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,4 @@ | ||
| self-hosted-runner: | ||
| labels: | ||
| - arm-runner | ||
| - blacksmith-4vcpu-ubuntu-2404-arm |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,104 @@ jobs: | |
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ACTION }} | ||
|
|
||
| binary_linux_amd64: | ||
| needs: release | ||
| runs-on: blacksmith-4vcpu-ubuntu-2404 | ||
| if: needs.release.outputs.published == 'true' | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| ref: v${{ needs.release.outputs.version }} | ||
|
|
||
| - uses: erlef/setup-beam@v1 | ||
| with: | ||
| otp-version: 27.x | ||
| elixir-version: 1.18.x | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| targets: x86_64-unknown-linux-musl | ||
|
|
||
| - run: mix deps.get --only prod | ||
|
|
||
| - name: Build Burrito binary | ||
| env: | ||
| MIX_ENV: prod | ||
| BURRITO_TARGET: linux_amd64 | ||
| SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }} | ||
| run: mix release | ||
|
|
||
| - name: Upload binary to GitHub release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ACTION }} | ||
| VERSION: ${{ needs.release.outputs.version }} | ||
| run: gh release upload "v${VERSION}" burrito_out/realtime_linux_amd64 --clobber | ||
|
|
||
| binary_linux_arm64: | ||
| needs: release | ||
| runs-on: arm-runner | ||
|
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Find actionlint configuration files
echo "=== Actionlint config files ==="
fd -HI 'actionlint' . --type f
fd -HI 'actionlint\.ya?ml$' .
# Check GitHub Actions workflows directory structure
echo -e "\n=== Workflow files in .github/workflows ==="
ls -la .github/workflows/ 2>/dev/null || echo "No .github/workflows found"
# Find all runs-on declarations in workflows
echo -e "\n=== All runs-on declarations ==="
rg -n 'runs-on:' .github/workflows --color=never -A 1 -B 1
# Check for any runner configuration files
echo -e "\n=== Files mentioning runner configuration ==="
rg -l 'runner' .github/ --type yml --type yaml 2>/dev/null | head -20
# Search for arm-runner and blacksmith definitions
echo -e "\n=== Search for arm-runner and blacksmith labels ==="
rg 'arm-runner|blacksmith' . --type yml --type yaml --color=neverRepository: supabase/realtime Length of output: 5286 🏁 Script executed: #!/bin/bash
# Check if these are standard GitHub-hosted runners
echo "=== Standard GitHub runners documentation check ==="
rg 'ubuntu|macos|windows' .github/workflows --type yml | head -20
# Look for any GitHub runner setup or configuration
echo -e "\n=== Check for runner setup/registration ==="
rg 'runs-on' .github/workflows -A 2 -B 2 --type yml | grep -E '(runs-on|self-hosted|labels)' | head -30
# Check if there's a .github/actionlint.yaml file or similar
echo -e "\n=== Check .github directory contents ==="
find .github -type f -name '*actionlint*' -o -name '*runner*' 2>/dev/nullRepository: supabase/realtime Length of output: 296 🏁 Script executed: #!/bin/bash
# Read the actionlint.yaml configuration
cat .github/actionlint.yamlRepository: supabase/realtime Length of output: 160 🏁 Script executed: #!/bin/bash
# Check the docker-build.yml to see what the matrix.runner variable contains
echo "=== docker-build.yml content around matrix.runner ==="
cat .github/workflows/docker-build.yml | grep -A 10 -B 5 'matrix.runner'Repository: supabase/realtime Length of output: 513 Unregistered runner labels will cause actionlint validation to fail.
🧰 Tools🪛 actionlint (1.7.11)[error] 74-74: label "arm-runner" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows", "blacksmith-4vcpu-ubuntu-2404", "blacksmith-8vcpu-ubuntu-2404". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file (runner-label) 🤖 Prompt for AI Agents |
||
| if: needs.release.outputs.published == 'true' | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| ref: v${{ needs.release.outputs.version }} | ||
|
|
||
| - uses: erlef/setup-beam@v1 | ||
| with: | ||
| otp-version: 27.x | ||
| elixir-version: 1.18.x | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - run: mix deps.get --only prod | ||
|
|
||
| - name: Build Burrito binary | ||
| env: | ||
| MIX_ENV: prod | ||
| BURRITO_TARGET: linux_arm64 | ||
| SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }} | ||
| run: mix release | ||
|
|
||
| - name: Upload binary to GitHub release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ACTION }} | ||
| VERSION: ${{ needs.release.outputs.version }} | ||
| run: gh release upload "v${VERSION}" burrito_out/realtime_linux_arm64 --clobber | ||
|
|
||
| binary_macos_arm64: | ||
| needs: release | ||
| runs-on: macos-15 | ||
| if: needs.release.outputs.published == 'true' | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| ref: v${{ needs.release.outputs.version }} | ||
|
|
||
| - uses: erlef/setup-beam@v1 | ||
| with: | ||
| otp-version: 27.x | ||
| elixir-version: 1.18.x | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - run: mix deps.get --only prod | ||
|
|
||
| - name: Build Burrito binary | ||
| env: | ||
| MIX_ENV: prod | ||
| BURRITO_TARGET: macos_arm64 | ||
| SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }} | ||
| run: mix release | ||
|
|
||
| - name: Upload binary to GitHub release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ACTION }} | ||
| VERSION: ${{ needs.release.outputs.version }} | ||
| run: gh release upload "v${VERSION}" burrito_out/realtime_macos_arm64 --clobber | ||
|
|
||
| docker_x86_release: | ||
| needs: release | ||
| runs-on: blacksmith-4vcpu-ubuntu-2404 | ||
|
|
||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: supabase/realtime
Length of output: 1267
🏁 Script executed:
Repository: supabase/realtime
Length of output: 191
🏁 Script executed:
Repository: supabase/realtime
Length of output: 453
🏁 Script executed:
Repository: supabase/realtime
Length of output: 858
🌐 Web query:
useblacksmith/cache GitHub Action security risk mutable tags💡 Result:
Using
useblacksmith/cache@v5(or any@vN/@main) carries the standard GitHub Actions supply-chain risk of mutable refs: the tag can be force-moved to a different commit, so a repo compromise (or malicious maintainer action) can make your workflow run new code without any change in your workflow file. Blacksmith’s own docs show migration viauseblacksmith/cache@v5, which is a mutable major tag by design. [1][2]This isn’t theoretical: in the tj-actions/changed-files incident (CVE-2025-30066), attackers updated the action and moved version tags to point at a malicious commit, exposing secrets in workflow logs. [3]
Mitigation (best practice):
@v5/@main. (You can still keep a human-readable comment like# v5.x.yand periodically bump the SHA in a controlled PR.) This avoids silent tag retargeting. [4]Sources
[1] Blacksmith docs – “Actions” (shows
useblacksmith/cache@v5usage) (docs.blacksmith.sh)[2] GitHub Docs – tags can be force-moved (
git tag -f …,git push -f --tags) (docs.github.com)[3] Report on tj-actions compromise + tag retargeting (CVE-2025-30066) (safetydetectives.com)
[4] Discussion of mutable refs vs commit-SHA pinning risk in GitHub Actions (orca.security)
Citations:
Pin
useblacksmith/cacheto an immutable commit SHA before merge.Line 37 uses
useblacksmith/cache@v5(mutable tag). This is a CI supply-chain risk; a retag can change executed code without PR changes (precedent: CVE-2025-30066 with tj-actions/changed-files). Please pin to a full 40-char commit SHA here and in other workflows (tests.yml, prod_linter.yml, rust.yml, lint.yml).🔒 Minimal fix pattern
🤖 Prompt for AI Agents