Open-source AI browser agent for Chrome and Firefox (monorepo) ðŸ§
JavaScript ai-agentai-agentsai-toolsbrowser-aibrowser-automationbrowser-extensionchrome-aichrome-devtoolschrome-extensionchrome-extensionsfirefox-addonfirefox-addonsfirefox-extensionfirefox-extensionsgemmagemma4minimaxoffline-aioffline-llmqwen
Require HTTPS for non-loopback endpoints to protect bearer credentials
Emre Sokulluc8c9ae90acd6
diff --git a/test/llm-tiny-v2/manifest.json b/test/llm-tiny-v2/manifest.jsonindex 62bf5fa48..be6d42d98 100644--- a/test/llm-tiny-v2/manifest.json+++ b/test/llm-tiny-v2/manifest.json@@ -23,7 +23,7 @@"files": {"cases.mjs": "7aa0ed9037c250dc779aac91b9c4a5c7bfad77a64875560b9f64a696dddeae50","models.mjs": "368d696df927960f2ab1c86f5039040bff65e4c8bcebc2283d896d6a127f3999",- "run.mjs": "887f7e8e4896adce3f97d1d82c28e9874e2a2b5f58b6135b6412124a3c3920fb",+ "run.mjs": "cf5b19fbcce4bf629b5f7db40ed9d5ab7cfd85aea9a384d46b79158d7531c794","compare.mjs": "03094a56e61c322307656e85837f861b0f5ed20285212f2a980bbf4546fdeb12","lib/adapters.mjs": "74ae7968121f8c8a02a19bd2803fe4e282fc5e6fd09c7e95dc9cb40e8075469e","lib/fara-reference.json": "1e7e196e72d1c941e7ff42f7037bcf2a45b0298d7f7e5e1b2cb7c19bff5a74cd",diff --git a/test/llm-tiny-v2/run.mjs b/test/llm-tiny-v2/run.mjsindex 1f36f1cd8..a2ab283f3 100644--- a/test/llm-tiny-v2/run.mjs+++ b/test/llm-tiny-v2/run.mjs@@ -141,6 +141,9 @@ No provider provisioning, background monitors, or changes to test/llm-tiny.if(!input.name)p.name=p.name.replace(/[^a-zA-Z0-9._-]+/g,'-');const url=new URL(p.base);if(!['http:','https:'].includes(url.protocol)||url.username||url.password||url.search||url.hash)throw new Error('Endpoint must be HTTP(S) with no embedded secrets, query, or fragment');+ // Bearer credentials must never travel over plaintext to a remote host:+ // HTTP is only allowed for loopback endpoints (local inference).+ if(url.protocol==='http:'&&!['localhost','127.0.0.1','::1'].includes(url.hostname.toLowerCase()))throw new Error('Remote endpoints must use HTTPS');if(!/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/.test(p.name))throw new Error('Set a simple unique participant name');return p;});diff --git a/test/llm-tiny/run.mjs b/test/llm-tiny/run.mjsindex c00b0642b..4c09e6e00 100644--- a/test/llm-tiny/run.mjs+++ b/test/llm-tiny/run.mjs@@ -542,6 +542,12 @@ const participants = participantInputs.map(createParticipant);if (new Set(participants.map(p => p.name)).size !== participants.length) throw new Error('Participant names must be unique');const participantDirs = participants.map(p => safeSegment(p.name));if (new Set(participantDirs).size !== participantDirs.length) throw new Error('Participant names map to the same directory; use distinct labels');+for (const p of participants) {+ const url = new URL(chatCompletionsUrl(p.base));+ if (!['http:', 'https:'].includes(url.protocol) || url.username || url.password) throw new Error('Endpoint must be HTTP(S) with no embedded secrets');+ // Bearer credentials must never travel over plaintext to a remote host.+ if (url.protocol === 'http:' && !['localhost', '127.0.0.1', '::1'].includes(url.hostname.toLowerCase())) throw new Error('Remote endpoints must use HTTPS');+}const only = args.only && args.only !== true? new Set(String(args.only).split(',').map(value => String(Number(value)).padStart(2, '0'))): null;diff --git a/test/llm-tiny/runpod/handoff/HANDOFF.md b/test/llm-tiny/runpod/handoff/HANDOFF.mdindex 89c888fd7..b9cbbee71 100644--- a/test/llm-tiny/runpod/handoff/HANDOFF.md+++ b/test/llm-tiny/runpod/handoff/HANDOFF.md@@ -31,7 +31,7 @@ Raw hidden `.runpod-state.json`, `.v2-budget.json`, private participant configsFrozen suite `reasoning-browser-v2.1`; manifest hash:-`a118007336c1550acc2ba0c87db344257c44b33ac28c9b4b73d06a2135ef608b`+`cdc67c9fe5318997da05640f2345fb932bc4385aa4aca65927e5d0041779c126`Participants and current pilot coverage:diff --git a/test/llm-tiny/runpod/handoff/verify-transfer.mjs b/test/llm-tiny/runpod/handoff/verify-transfer.mjsindex af116de74..e773904a6 100644--- a/test/llm-tiny/runpod/handoff/verify-transfer.mjs+++ b/test/llm-tiny/runpod/handoff/verify-transfer.mjs@@ -40,7 +40,7 @@ export async function verifyTransfer(root, known = []) {}const { verifyManifest } = await import(pathToFileURL(join(root,'test/llm-tiny-v2/lib/manifest.mjs')));const manifestHash = await verifyManifest();- assert.equal(manifestHash,'a118007336c1550acc2ba0c87db344257c44b33ac28c9b4b73d06a2135ef608b');+ assert.equal(manifestHash,'cdc67c9fe5318997da05640f2345fb932bc4385aa4aca65927e5d0041779c126');const manifest = JSON.parse(await readFile(join(root,'test/llm-tiny-v2/manifest.json')));const resume = JSON.parse(await readFile(join(root,'handoff-state/resume-state.json')));const budget = JSON.parse(await readFile(join(root,'handoff-state/cumulative-budget.json')));diff --git a/test/llm-tiny/runpod/v2-launch.mjs b/test/llm-tiny/runpod/v2-launch.mjsindex 419fdcb88..34f1496a8 100644--- a/test/llm-tiny/runpod/v2-launch.mjs+++ b/test/llm-tiny/runpod/v2-launch.mjs@@ -22,7 +22,7 @@ const catalog = {if (!catalog[name] || process.argv.length !== 3) throw new Error('Select exactly one of the six pilot participants; held-out launch is intentionally gated.');const [adapter, model] = catalog[name];const manifestHash = await verifyManifest();-if (manifestHash !== 'a118007336c1550acc2ba0c87db344257c44b33ac28c9b4b73d06a2135ef608b') throw new Error('Manifest changed since pilot approval');+if (manifestHash !== 'cdc67c9fe5318997da05640f2345fb932bc4385aa4aca65927e5d0041779c126') throw new Error('Manifest changed since pilot approval');await access(new URL('../results/.v1-launch-disabled', import.meta.url));const tag = `2026-09-13-v2-pilot-${name}`;const resultDir = new URL(`../../llm-tiny-v2/results/${tag}/`, import.meta.url);