Skip to content

Run Together tasks over Bartender's Hurdle socket - #2

Draft
fertapric-togetherai wants to merge 4 commits into
mainfrom
ws-server
Draft

fertapric-togetherai wants to merge 4 commits into
mainfrom
ws-server

Conversation

@fertapric-togetherai

Copy link
Copy Markdown

Bartender's Hurdle API gives the controller one WebSocket
to a fresh sandbox and nothing else: no exec, no sandbox
token. Closing it terminates the sandbox.

When HURDLE_TOGETHER_RUN_URL is set, hurdle writes the
task inputs over that socket, runs each task step inside
the sandbox, and reads the sealed results back. The
Agent's egress reaches the Guardian on the same socket,
and the Guardian CA crosses in X-Sandbox-CA.

A server baked into the snapshot runs the steps with the
existing staging, launch, sealing and trust code, against
its own processes, so the E2B and sandbox API paths keep
a single copy of that logic.

Readiness skips the sandbox API check in this mode, since
Bartender refuses a bad key when the run connects.
HURDLE_TOGETHER_API_URL points the sandbox API at a local
control plane such as devbox.

mojojoji and others added 3 commits October 21, 2026 23:21
Bartender's Hurdle API gives the controller one WebSocket
to a fresh sandbox and nothing else: no exec, no sandbox
token. Closing it terminates the sandbox.

When HURDLE_TOGETHER_RUN_URL is set, hurdle writes the
task inputs over that socket, runs each task step inside
the sandbox, and reads the sealed results back. The
Agent's egress reaches the Guardian on the same socket,
and the Guardian CA crosses in X-Sandbox-CA.

A server baked into the snapshot runs the steps with the
existing staging, launch, sealing and trust code, against
its own processes, so the E2B and sandbox API paths keep
a single copy of that logic.

Readiness skips the sandbox API check in this mode, since
Bartender refuses a bad key when the run connects.
HURDLE_TOGETHER_API_URL points the sandbox API at a local
control plane such as devbox.
@broly-code-security-scanner

broly-code-security-scanner Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Broly Security Scan

Note

Summary

2 actionable finding(s) in this PR
11 total in scan · 9 dismissed false positives

  • 🟠 1 high
  • 🟡 1 medium

Main table: 2 shown, 0 omitted of 2 actionable finding(s) above the reporting threshold. See the repository Security tab for the full set.

Severity Scanner Issue Location Dismiss Verdict
🟠 HIGH SAST The sandbox's control WebSocket endpoint has no
authentication; the first client to connect
becom...
harness/lib/execution-environments/sandbox-server.mjs:180 d2 🔺 TRUE_POSITIVE · Confidence: HIGH
🟡 MEDIUM SAST Exchange-fact requirement can be bypassed by
omitting or altering the untrusted event.host
field.
harness/lib/egress-evidence.mjs:272 d3 🔺 TRUE_POSITIVE · Confidence: HIGH

Fix Suggestions

The sandbox's control WebSocket endpoint has no authentication; the first client to connect becom... — harness/lib/execution-environments/sandbox-server.mjs:180

Default the control server's listen host to loopback like the relay, and require the caller to opt into a non-loopback bind explicitly.

  • listen now defaults host to 127.0.0.1 instead of 0.0.0.0, matching the relay's relay.listen(flowPort, "127.0.0.1", ready) binding.
  • Binding the control WebSocket to loopback prevents a remote host from claiming the single used controller slot and delivering an attacker CA to writeFile(caPath, certificate, ...).
  • Limitation: the upgrade handler still performs no credential check — any local process on the sandbox host can still connect first and supply an arbitrary X-Sandbox-CA value; verifying it against an expected Guardian CA would require an option not present in createSandboxServer's parameters.
--- a/harness/lib/execution-environments/sandbox-server.mjs
+++ b/harness/lib/execution-environments/sandbox-server.mjs
@@ -211,7 +211,7 @@
   server.on("clientError", (_error, socket) => socket.destroy());
 
   return Object.freeze({
-    async listen({ host = "0.0.0.0" } = {}) {
+    async listen({ host = "127.0.0.1" } = {}) {
       await new Promise((ready, failed) => {
         relay.once("error", failed);
         relay.listen(flowPort, "127.0.0.1", ready);

Dismiss false positives

Tick a box to dismiss the finding; untick it to bring the finding back. That is the same as replying /broly dismiss d1 and /broly undismiss d1. To record why it is a false positive, reply with /broly dismiss d1: your reason instead — Broly reuses those reasons to triage similar findings across the org.

  • d2 · 🟠 HIGH     · harness/lib/execution-environments/sandbox-server.mjs:180 · The sandbox's control WebSocket endpoint has no authentication; the first cli...
  • d3 · 🟡 MEDIUM   · harness/lib/egress-evidence.mjs:272 · Exchange-fact requirement can be bypassed by omitting or altering the untrust...

Note

Re-scan this PR anytime with /broly scan — useful after /broly undismiss, or to refresh findings without a new push.

Broly — SAST (GLM-5.3-Flash) · Secrets · SCA · IaC · GH Actions · Base Images · Supply Chain Threats · Attack Hypotheses · Adversarial Verification

We're continuously improving Broly's accuracy and finding quality — your feedback is valuable. False positives, missed findings, bugs, and feature requests all welcome.

Ask in #security-engineering   Powered by Together AI

Bartender now starts Hurdle sandboxes without internet
access, DNS included. Setup resolved each capture host in
the sandbox to drop direct routes to it, so any suite with
capture hosts failed there.

Those routes are already refused by the node, so the
in-sandbox setup skips that step. installWorkloadTrust
keeps it by default, so E2B and the sandbox API path are
unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants