openclaw - 💡(How to fix) Fix Harden Bun install: pin version + SHA256 checksum [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59028Fetched 2026-04-08 02:29:40
View on GitHub
Comments
1
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1locked ×1

Fix Action

Fix

Download specific Bun version binary, verify SHA256 before unpacking:

BUN_VERSION="1.2.5"
BUN_SHA256="<from official release>"
curl -fsSL "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip" -o /tmp/bun.zip
echo "${BUN_SHA256}  /tmp/bun.zip" | sha256sum -c -
unzip /tmp/bun.zip -d /usr/local/bin

Code Example

curl -fsSL https://bun.sh/install | bash

---

BUN_VERSION="1.2.5"
BUN_SHA256="<from official release>"
curl -fsSL "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip" -o /tmp/bun.zip
echo "${BUN_SHA256}  /tmp/bun.zip" | sha256sum -c -
unzip /tmp/bun.zip -d /usr/local/bin
RAW_BUFFERClick to expand / collapse

Problem

Dockerfile line 50 uses pipe-to-bash with no checksum:

curl -fsSL https://bun.sh/install | bash

Same pattern in Dockerfile.sandbox-common line 33.

Risk

  • No checksum verification on downloaded script
  • No version pinning — pulls latest
  • Build-time only (not in production runtime), but a compromised install script could inject malicious code into the built image

Fix

Download specific Bun version binary, verify SHA256 before unpacking:

BUN_VERSION="1.2.5"
BUN_SHA256="<from official release>"
curl -fsSL "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip" -o /tmp/bun.zip
echo "${BUN_SHA256}  /tmp/bun.zip" | sha256sum -c -
unzip /tmp/bun.zip -d /usr/local/bin

Priority

High — main Dockerfile build-time supply chain risk

🤖 Generated with Claude Code

extent analysis

TL;DR

Update the Dockerfile and Dockerfile.sandbox-common to download a specific version of Bun and verify its SHA256 checksum before installation.

Guidance

  • Identify the specific version of Bun that is required and update the BUN_VERSION variable accordingly.
  • Obtain the SHA256 checksum of the Bun binary from the official release notes and update the BUN_SHA256 variable.
  • Replace the pipe-to-bash command with the suggested code snippet that downloads the binary, verifies the checksum, and unpacks it.
  • Review the Dockerfile and Dockerfile.sandbox-common for any other instances of unverified downloads or installations.

Example

The provided code snippet in the issue body demonstrates how to download a specific version of Bun, verify its SHA256 checksum, and unpack it:

BUN_VERSION="1.2.5"
BUN_SHA256="<from official release>"
curl -fsSL "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip" -o /tmp/bun.zip
echo "${BUN_SHA256}  /tmp/bun.zip" | sha256sum -c -
unzip /tmp/bun.zip -d /usr/local/bin

Replace <from official release> with the actual SHA256 checksum of the Bun binary.

Notes

This fix assumes that the official release notes provide the SHA256 checksum of the Bun binary. If the checksum is not available, an alternative verification method may be necessary.

Recommendation

Apply the workaround by updating the Dockerfile and Dockerfile.sandbox-common to use the suggested code snippet, as it provides a more secure way to download and install Bun by verifying the SHA256 checksum of the binary.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING