Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh

Commit

Sandboxes choose their outbound interception as they start again, as they did before 5152e1f3: a job that may be given brokered secrets sends its HTTP and HTTPS through egress, any other sandbox has only the abuse-report host intercepted. Naming that host on each sandbox class up front (outboundByHost in a static block) left every cloud runner unable to pick up its job until g1t-runner was rolled back; every sandbox still reaches the internet, with no list of hosts.

syntaqxcommitted Parent998eca2Browse files
1 file+15−150/1 viewed
+15−15
296296 interceptHttps = true;
297297 static {
298298 // Assigned, not declared: a class field would hide the setter that
299− // registers the handler with the containers library. `ABUSE_HOST`,
300− // named up front, is the only host intercepted on its own, so every
301− // other request goes straight out.
299+ // registers the handler with the containers library. Which one a
300+ // sandbox uses is chosen as it starts (`run`).
302301 AttemptSandbox.outboundHandlers = { egress, abuse };
303− AttemptSandbox.outboundByHost = { [ABUSE_HOST]: abuse };
304302 }
305303
306304 async run(request: RunRequest): Promise<void> {
364362 }
365363 return;
366364 }
367− // Every sandbox reaches the internet. Its requests go straight out,
368− // and only `ABUSE_HOST` is intercepted (`outboundByHost`), unless
369− // it is a workflow job that may be given brokered secrets: then its
370− // HTTP and HTTPS pass `egress`, which fills them in from the job's
371− // stand-ins (asked for with the job's token) and sends every
372− // request on, to any host. Other protocols go straight out.
373− // Cloudflare Containers intercept either the hosts a class names
374− // up front or, once a handler is chosen at run time, everything, so
375− // the hosts of one job's secrets cannot be singled out.
365+ // Every sandbox reaches the internet. A workflow job that may be
366+ // given brokered secrets sends its HTTP and HTTPS through `egress`,
367+ // which fills them in from the job's stand-ins (asked for with the
368+ // job's token) and sends every request on, to any host; any other
369+ // sandbox has only `ABUSE_HOST` intercepted, so it can report that it
370+ // stopped itself for mining. Both are chosen here, as it starts: hosts
371+ // named on the class up front (`outboundByHost` in a static block)
372+ // left sandboxes that never picked up their jobs (rolled back
373+ // 2026-10-13).
376374 const brokering = run.kind === "actions" && throughWorker(build, this.env.EGRESS);
377375 this.enableInternet = true;
378376 if (brokering && run.kind === "actions") {
379377 await this.setOutboundHandler("egress", { job: { id: run.jobId, token: run.token } });
378+ } else if (this.env.EGRESS?.trim().toLowerCase() !== "off") {
379+ await this.setOutboundByHost(ABUSE_HOST, "abuse").catch((error: unknown) =>
380+ console.log("abuse reports not routed", String(error)),
381+ );
380382 }
381383 const harness = guard && !build ? harnessEnv(guard, vars) : {};
382384 // Its HTTPS is re-signed as it passes the Worker, so it trusts that
765767 export class Sandbox2Core extends AttemptSandbox {
766768 static {
767769 Sandbox2Core.outboundHandlers = { egress, abuse };
768− Sandbox2Core.outboundByHost = { [ABUSE_HOST]: abuse };
769770 }
770771 }
771772 export class Sandbox4Core extends AttemptSandbox {
772773 static {
773774 Sandbox4Core.outboundHandlers = { egress, abuse };
774− Sandbox4Core.outboundByHost = { [ABUSE_HOST]: abuse };
775775 }
776776 }
777777

Comments

Sign in to comment.