Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d35592b
merge dev into main for the v2.32.1 release
lidge-jun Aug 25, 2026
71c57ea
release: v2.32.1
lidge-jun Aug 25, 2026
d560ac6
merge dev into main for the v2.33.0 release
lidge-jun Aug 25, 2026
08ada6f
Merge pull request #2553 from lidge-jun/codex/promote-main-2330
lidge-jun Aug 25, 2026
ec51e42
release: v2.33.0
lidge-jun Aug 25, 2026
e25b653
merge dev into main for the v2.34.0 release
lidge-jun Aug 27, 2026
80fff9a
Merge pull request #2760 from lidge-jun/codex/promote-main-2340
lidge-jun Aug 27, 2026
fc4de77
Merge pull request #2826 from lidge-jun/codex/promote-main-2350
lidge-jun Aug 28, 2026
c7d8407
Merge pull request #3002 from lidge-jun/codex/promote-main-2360
lidge-jun Aug 30, 2026
54e2274
Merge pull request #3037 from lidge-jun/codex/promote-main-2370
lidge-jun Aug 31, 2026
2c4dca1
merge dev into the promotion branch for v2.38.0
lidge-jun Aug 31, 2026
a34e8b7
merge dev into the promotion branch for v2.38.0 (picks up the ReDoS fix)
lidge-jun Aug 31, 2026
ebb4d55
Merge pull request #3073 from lidge-jun/codex/promote-main-2380
lidge-jun Aug 31, 2026
682112e
Merge remote-tracking branch 'origin/dev' into codex/promote-main-2390
lidge-jun Sep 1, 2026
af6113a
merge dev into main for the v2.39.0 release
lidge-jun Sep 1, 2026
847f4f1
merge dev into main for the v2.40.0 release
Sep 2, 2026
ac78647
Merge pull request #3261 from lidge-jun/codex/promote-main-2400
lidge-jun Sep 2, 2026
aaa9eaf
fix(release): pass the bump job's permissions through the reusable-wo…
lidge-jun Sep 2, 2026
35ff3a4
Merge pull request #3263 from lidge-jun/codex/promote-main-2400-relfix
lidge-jun Sep 2, 2026
651ae4b
fix(connect): reject remote plaintext hubs
luvs01 Sep 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ jobs:
bump-dev-version:
needs: publish
if: ${{ inputs.dry-run != true }}
# A reusable-workflow CALL cannot grant the callee more than the calling job holds,
# and GitHub refuses the whole run at startup when the called workflow's own job
# declares permissions the caller did not pass down ("startup_failure", runs
# 33615174183 / 33615177849 — the first dispatches since #3129 wired this call).
# The callee's job declares exactly these two; nothing else in this file gains them.
permissions:
contents: write
pull-requests: write
uses: ./.github/workflows/dev-version-bump.yml
with:
released-version: v${{ inputs.version }}
Expand Down
18 changes: 9 additions & 9 deletions src/client/hub-client.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { MAX_REMOTE_CATALOG_BYTES } from "../server/catalog-download";
import { readBoundedResponseBytes } from "../lib/bounded-body";

/**
* A pairing grant may cross loopback or authenticated HTTPS, and nothing else.
*
* Mirrors the hub-side rule in src/server/gui-session.ts. Checking here too is not
* redundant: it keeps the client from spending a single-use code on a request the hub is
* certain to refuse.
*/
function isPairingTransportPermitted(origin: string): boolean {
/** Hub traffic may cross loopback or authenticated HTTPS, and nothing else. */
function isHubTransportPermitted(origin: string): boolean {
let url: URL;
try {
url = new URL(origin);
Expand Down Expand Up @@ -171,6 +165,12 @@ export function normalizeHubOrigin(input: string): string {
"Hub URL must be an HTTP(S) origin without credentials, query, fragment, or non-/v1 path",
);
}
if (!isHubTransportPermitted(parsed.origin)) {
throw new HubClientError(
"insecure_http_refused",
"Hub URLs require loopback or HTTPS; plaintext remote HTTP is not permitted",
);
Comment on lines +168 to +172

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Provide an HTTPS path for the remote data listener

This blanket rejection makes the documented remote-hub topology unusable: docs-site/src/content/docs/guides/remote-hub.md:71-99 binds and probes the data listener as http://100.64.0.10:10100, while its only HTTPS Serve mapping targets the management-only ingress (:104-125), which explicitly rejects /readyz and /v1/* in src/server/index.ts:840-844. Consequently the plaintext data URL now fails here before discovery, whereas the documented HTTPS URL cannot provide discovery or catalog/model traffic, so clients cannot connect or sync without an undocumented additional proxy. Preserve the security boundary by provisioning and documenting a separate authenticated HTTPS route to the data listener (including translated guides), then use that route in the connection instructions.

AGENTS.md reference: AGENTS.md:L343-L344

Useful? React with 👍 / 👎.

}
return parsed.origin;
}

Expand Down Expand Up @@ -230,7 +230,7 @@ export async function exchangeConnectPairingGrant(
// Deliberateness is not the control that matters: the grant is readable by anything on the
// path and the session it mints is reusable. The hub refuses this exchange outright now, so
// sending it would only burn a single-use code against a certain rejection.
if (!isPairingTransportPermitted(origin)) {
if (!isHubTransportPermitted(origin)) {
throw new HubClientError("insecure_http_refused", "Pairing requires loopback or HTTPS; plaintext HTTP cannot carry a grant");
}
const response = await fetchBounded(options.fetchImpl ?? fetch, `${origin}/opencodex-session`, {
Expand Down
14 changes: 13 additions & 1 deletion tests/client-connect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ describe("remote hub client boundary", () => {
test("canonicalizes origin and terminal /v1 only", () => {
expect(normalizeHubOrigin("https://hub.example.test/v1")).toBe("https://hub.example.test");
expect(normalizeHubOrigin("https://hub.example.test/v1/")).toBe("https://hub.example.test");
expect(normalizeHubOrigin("http://localhost:10100/v1")).toBe("http://localhost:10100");
expect(normalizeHubOrigin("http://127.0.0.1:10100")).toBe("http://127.0.0.1:10100");
expect(normalizeHubOrigin("http://[::1]:10100")).toBe("http://[::1]:10100");
for (const value of [
"ftp://hub.example.test",
"http://hub.example.test",
"https://user@hub.example.test",
"https://hub.example.test/private",
"https://hub.example.test/?secret=1",
Expand All @@ -85,9 +89,17 @@ describe("remote hub client boundary", () => {
}
});

test("rejects plaintext remote discovery before sending a request", async () => {
let calls = 0;
await expect(fetchHubReady("http://hub.example.test", {
fetchImpl: async () => { calls += 1; return Response.json(readyBody()); },
})).rejects.toThrow("plaintext remote HTTP is not permitted");
expect(calls).toBe(0);
});

test("admin key issuance is HTTPS-only and pairing exchanges into a full GUI session", async () => {
let calls = 0;
await expect(issueClientKey("http://hub.example.test", {
await expect(issueClientKey("http://localhost:10100", {
kind: "admin",
value: new TextEncoder().encode("ocx_admin_secret"),
}, "client", {
Expand Down
Loading