From f62e9a82338db2ec2611efef2b9d9cbbb047f3db Mon Sep 17 00:00:00 2001 From: "gominimal-pkgmgr-mgr[bot]" <285843623+gominimal-pkgmgr-mgr[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 20:11:43 +0000 Subject: [PATCH 1/8] Update agent-browser to 0.41.1 --- packages/agent-browser/build.ncl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/agent-browser/build.ncl b/packages/agent-browser/build.ncl index b9ad2ed8a..f1b0417ea 100644 --- a/packages/agent-browser/build.ncl +++ b/packages/agent-browser/build.ncl @@ -37,14 +37,14 @@ let glibc = import "../glibc/build.ncl" in # upstream changes (the pkgmgr-rs#1028 trigger), if the smaller closure matters. let chromium-bin = import "../chromium-bin/build.ncl" in -let version = "0.15.1" in +let version = "0.41.1" in { name = "agent-browser", build_deps = [ { file = "build.sh" } | Local, { url = "gs://minimal-staging-archives/vercel-labs/agent-browser/v%{version}.tar.gz", - sha256 = "c30724a5fba1beb217ca5ce5ce9eee43b596dc72efe9ac29adb9af717795b6c9", + sha256 = "b3d9d60b8a38f05e0f9b4d84d9e0b6995c21df2eb963eefb703008682a69f3bb", extract = true, strip_prefix = "agent-browser-%{version}", } | Source, From 5df9ce17fe930d810db8835ec28646d9f53f69a0 Mon Sep 17 00:00:00 2001 From: bryan Date: Mon, 2 Nov 2026 12:20:46 -0800 Subject: [PATCH 2/8] agent-browser: 0.41.1 is a native Rust CLI; ship the binary, embed the dashboard 0.20.0 removed the Node.js daemon (upstream #754). The npm package's bin/agent-browser.js only picks a per-platform binary, so the recipe no longer runs `pnpm build` or ships dist/, node_modules or a node runtime. - Build the dashboard (Next.js static export) first, as upstream's `build:source` does: cli/src/native/stream/http.rs embeds packages/dashboard/out with rust-embed, and cli/build.rs otherwise embeds a "Dashboard not built" placeholder. Pin Next's buildId, disable Next telemetry, keep pnpm from fetching the pinned pnpm 11.1.3. - `cargo build --locked`. - Install the binary under usr/libexec/agent-browser/bin with skills/ and skill-data/ beside it (skills.rs / chat.rs look them up relative to the binary's canonical path). Ship the axe-core licence files. - Wrapper: AGENT_BROWSER_EXECUTABLE_PATH defaults to chromium-bin's /usr/bin/chromium (CVE-2026-111943; the env var also reaches the daemon auto-launch, mcp and doctor paths), and AGENT_BROWSER_USE_SYSTEM_CA=1 so the CLI's own HTTPS (`read` etc.) verifies against ca-certificates rather than its compiled-in webpki-roots 1.0.5. ca-certificates becomes a runtime dep. - runtime_deps: drop node-lts; add ca-certificates. - license_spdx lists what the binary compiles in (axe-core MPL-2.0, CDP protocol BSD-3-Clause, Geist OFL-1.1, MIT/ISC JS). - Tests: version, skills, dashboard embedded, open + get title, and the distrust/system-CA wiring. Co-Authored-By: Claude Opus 5.5 --- packages/agent-browser/build.ncl | 81 ++++++++++++++--- packages/agent-browser/build.sh | 147 +++++++++++++++++++------------ 2 files changed, 159 insertions(+), 69 deletions(-) diff --git a/packages/agent-browser/build.ncl b/packages/agent-browser/build.ncl index f1b0417ea..2d161f897 100644 --- a/packages/agent-browser/build.ncl +++ b/packages/agent-browser/build.ncl @@ -1,4 +1,4 @@ -let { standaloneTest, subsetOf, Attrs, BuildSpec, Local, OutputBin, OutputData, Source, Test, .. } = import "minimal.ncl" in +let { Attrs, BuildSpec, Local, OutputBin, OutputData, Source, Test, .. } = import "minimal.ncl" in let base = import "../base/build.ncl" in let toolchain = import "../toolchain/build.ncl" in let make = import "../make/build.ncl" in @@ -6,6 +6,7 @@ let pkgconf = import "../pkgconf/build.ncl" in let rust = import "../rust/build.ncl" in let node-lts = import "../node-lts/build.ncl" in let pnpm = import "../pnpm/build.ncl" in +let ca-certificates = import "../ca-certificates/build.ncl" in let bash = import "../bash/build.ncl" in let glibc = import "../glibc/build.ncl" in @@ -56,23 +57,46 @@ let version = "0.41.1" in node-lts, pnpm, ], + # node-lts and pnpm build only the dashboard the binary embeds. The CLI is a + # native Rust binary: 0.20.0 removed the Node.js daemon (upstream #754), and + # the npm package's bin/agent-browser.js is just a launcher that picks the + # per-platform binary. So node is no longer a runtime dep and no + # node_modules ships. runtime_deps = [ - bash, - subsetOf node-lts ["node"], + bash, # the /usr/bin/agent-browser wrapper glibc, chromium-bin, + # The wrapper sets AGENT_BROWSER_USE_SYSTEM_CA=1: the CLI's own HTTPS + # (`read`, `doctor`, plugins…) reads /etc/ssl/certs instead of its + # compiled-in webpki-roots (pkgs AGENTS.md "Trust store"). + ca-certificates, ], cmd = "./build.sh", outputs = { + # Wrapper: sets AGENT_BROWSER_EXECUTABLE_PATH / AGENT_BROWSER_USE_SYSTEM_CA + # defaults, then execs the binary below (see build.sh). bin = { glob = "usr/bin/agent-browser" } | OutputBin, + # The binary (with the dashboard, axe-core and the CDP protocol compiled + # in) and the skills/ + skill-data/ trees it serves via `agent-browser + # skills` and the MCP `skills_*` tools. It finds them relative to its own + # canonical path, so they must stay beside bin/. libexec = { glob = "usr/libexec/agent-browser/**", allow_executable = true } | OutputData, + licenses = { glob = "usr/share/licenses/agent-browser/**" } | OutputData, }, attrs = { upstream_version = version, - license_spdx = "Apache-2.0", + # The binary compiles in more than agent-browser's own Apache-2.0 code: + # MPL-2.0 axe-core 4.12.1 (cli/src/native/a11y/axe.min.js, include_str!) + # MIT, ISC axe-core's bundled third-party code (LICENSE-axe-core-THIRD-PARTY.txt) + # MIT React DevTools installHook.js (cli/src/native/react) + # BSD-3-Clause Chrome DevTools Protocol JSON (cli/cdp-protocol, codegen in build.rs) + # OFL-1.1 Geist font, self-hosted into the embedded dashboard by next/font + # dashboard JS next, react, radix-ui, ai, streamdown, … (MIT / ISC / Apache-2.0) + # Rust crates from cli/Cargo.lock (see the PR that bumped to 0.41.1 for the list) + license_spdx = "Apache-2.0 AND MPL-2.0 AND MIT AND ISC AND BSD-3-Clause AND OFL-1.1", source_provenance = { category = 'GithubRepo, owner = "vercel-labs", @@ -82,30 +106,63 @@ let version = "0.41.1" in } | Attrs, tests = { - smoketest = standaloneTest "/bin/agent-browser --version", + version = + { + class = 'Standalone, + test_deps = [base], + cmds = [ + ["/bin/bash", "-c", "/bin/agent-browser --version | grep -qx 'agent-browser %{version}'"], + ], + } | Test, + # The skills lookup is relative to the binary's canonical path + # (skills.rs find_package_root): a layout change breaks it silently, so + # list them and require the bundled `core` skill. + skills = + { + class = 'Standalone, + test_deps = [base], + cmds = [ + ["/bin/bash", "-c", "/bin/agent-browser skills list | grep -qw core"], + ["/bin/bash", "-c", "/bin/agent-browser skills get core | grep -q agent-browser"], + ], + } | Test, + # The real dashboard export is embedded, not cli/build.rs's placeholder. + dashboard_embedded = + { + class = 'Standalone, + test_deps = [base], + cmds = [ + ["/bin/bash", "-c", "grep -qa 'Observability dashboard for agent-browser' /usr/libexec/agent-browser/bin/agent-browser"], + ["/bin/bash", "-c", "! grep -qa 'Dashboard not built' /usr/libexec/agent-browser/bin/agent-browser"], + ], + } | Test, open_check = { class = 'Standalone, test_deps = [base], cmds = [ - # End-to-end: drive `agent-browser open` against a data: URL - # and assert the page title appears in stdout. This exercises - # the full path — Rust CLI launches the TS daemon, daemon - # spawns chromium via /bin/chromium, navigates, returns - # title. + # End-to-end: the CLI starts its native daemon, which launches + # chromium-bin's /usr/bin/chromium headless (the wrapper's + # AGENT_BROWSER_EXECUTABLE_PATH), navigates to a data: URL, and + # prints the page title. ["/bin/bash", "-c", "/bin/agent-browser open 'data:text/html,agent-browser-open-ok' | grep -q agent-browser-open-ok"], + ["/bin/bash", "-c", "/bin/agent-browser get title | grep -q agent-browser-open-ok"], + ["/bin/bash", "-c", "/bin/agent-browser close"], ], } | Test, # CVE-2026-111943: the daemon must launch chromium-bin's full browser, # which reads the CADistrustedCertificates policy. headless-shell cannot - # (see the comment at the chromium-bin import). + # (see the comment at the chromium-bin import). And the CLI's own HTTPS + # must use the system store, not its compiled-in webpki-roots. distrust_policy_wired = { class = 'Standalone, test_deps = [base], cmds = [ - ["/bin/bash", "-c", "grep -qF -- '--executable-path /usr/bin/chromium \"' /usr/bin/agent-browser"], + ["/bin/bash", "-c", "grep -qF 'AGENT_BROWSER_EXECUTABLE_PATH:-/usr/bin/chromium}' /usr/bin/agent-browser"], + ["/bin/bash", "-c", "grep -qF 'AGENT_BROWSER_USE_SYSTEM_CA:-1}' /usr/bin/agent-browser"], ["/bin/bash", "-c", "grep -q CADistrustedCertificates /etc/chromium/policies/managed/ca-distrusted-certificates.json"], + ["/bin/bash", "-c", "test -s /etc/ssl/certs/ca-certificates.crt"], ], } | Test, }, diff --git a/packages/agent-browser/build.sh b/packages/agent-browser/build.sh index 12d012be1..b2ac5d604 100755 --- a/packages/agent-browser/build.sh +++ b/packages/agent-browser/build.sh @@ -1,74 +1,107 @@ #!/bin/sh -set -e +set -eu -# pnpm 11 migration: strictDepBuilds now defaults to true, so unreviewed -# dependency build scripts (esbuild/geckodriver/…) are a hard error -# (ERR_PNPM_IGNORED_BUILDS) rather than a warning — but this build deliberately -# skips them (`--ignore-scripts`; the daemon ships a prebuilt binary), so demote -# it back to a warning. Also disable the pre-script deps check, which otherwise -# reinstalls before `pnpm build` and re-runs the husky postinstall (which needs -# a `.git` the source tarball doesn't have). +# agent-browser >= 0.16 is a native Rust CLI. The npm package's +# bin/agent-browser.js is only a launcher that picks the per-platform binary +# (and scripts/postinstall.js downloads one), so we build the binary from +# source and ship it on its own: no node, no node_modules at runtime. +# +# Build order mirrors upstream's `pnpm run build:source`: +# 1. the dashboard (Next.js static export, packages/dashboard/out), which +# cli/src/native/stream/http.rs embeds with rust-embed at compile time; +# without it cli/build.rs embeds a "Dashboard not built" placeholder; +# 2. the Rust CLI. + +# pnpm 11+: strictDepBuilds defaults to true. We install with --ignore-scripts +# (no dependency build script is needed for a static export), so keep the +# skipped builds a warning. Also skip the pre-script deps check, which would +# reinstall and re-run lifecycle scripts before `pnpm build`. export PNPM_CONFIG_STRICT_DEP_BUILDS=false export PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false - -# pnpm 12 places its default store on the project's own volume when it cannot -# hardlink into its home store, and in the sandbox /build is a separate mount, -# so the store lands in node_modules/.pnpm-store — which the `cp -R node_modules` -# below would ship. Pin it outside the build tree, where pnpm 11 put it. +# Keep pnpm's store out of the source tree (pnpm 12 otherwise puts it in +# node_modules/.pnpm-store when /build is a separate mount). export PNPM_CONFIG_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/pnpm/store" +# package.json pins "packageManager": "pnpm@11.1.3". Build with our pnpm +# (engines: pnpm >= 11) instead of letting it download that one at build time +# (pmOnFail is pnpm 11+'s setting; manage-package-manager-versions pnpm 10's). +export PNPM_CONFIG_PM_ON_FAIL=ignore +export PNPM_CONFIG_MANAGE_PACKAGE_MANAGER_VERSIONS=false +# No Next.js telemetry from the build. +export NEXT_TELEMETRY_DISABLED=1 + +# --- 1. dashboard ----------------------------------------------------------- +# Only the dashboard's dependencies (the workspace also holds docs and the +# @agent-browser/{eve,sandbox} packages, none of which ship). Lockfile-pinned. +pnpm install --frozen-lockfile --ignore-scripts --filter dashboard + +# Next.js bakes a random (nanoid) buildId into out/_next/static// and +# every page's RSC payload; pin it so the embedded dashboard, and with it the +# binary, is reproducible (same fix as packages/next's bundle-analyzer). +sed -i 's/output: "export",/output: "export", generateBuildId: async () => "agent-browser-reproducible",/' \ + packages/dashboard/next.config.ts +grep -q 'agent-browser-reproducible' packages/dashboard/next.config.ts \ + || { echo "ERROR: dashboard generateBuildId repro patch did not apply (next.config.ts changed upstream)" >&2; exit 1; } + +# next/font/google (layout.tsx's Geist) downloads the font at build time and +# self-hosts it in out/_next/static/media; the build has network via rust's +# `needs`. +(cd packages/dashboard && pnpm build) +test -f packages/dashboard/out/index.html +if grep -q 'Dashboard not built' packages/dashboard/out/index.html; then + echo "ERROR: dashboard export is the placeholder" >&2 + exit 1 +fi +# --- 2. Rust CLI ------------------------------------------------------------ export CC=gcc export LD=gcc export RUSTFLAGS="-C linker=gcc --remap-path-prefix=$(pwd)=/builddir --remap-path-prefix=$HOME/.cargo=/cargo -C codegen-units=1" export CONST_RANDOM_SEED=0 # pin ahash/const-random compile-time seed -# Install JS deps (skip postinstall which downloads pre-built binary). -# Use the hoisted node-linker so node_modules is a flat, self-contained -# tree — pnpm's default symlinked layout into .pnpm/ doesn't survive -# being copied into $OUTPUT_DIR and causes runtime ERR_MODULE_NOT_FOUND -# on transitive deps (e.g. jszip). -pnpm install --ignore-scripts --config.node-linker=hoisted +cargo build --release --locked --manifest-path cli/Cargo.toml -# Build TypeScript daemon -pnpm build +# --- install ---------------------------------------------------------------- +# Layout matches the npm package, which the binary's lookups assume: +# skills.rs find_package_root(): /../skill-data/core/SKILL.md +# stream/chat.rs find_skills_dir(): walks up from the exe to skills/agent-browser/SKILL.md +# Both canonicalize current_exe(), so the real binary must live inside the tree. +LIBEXEC=$OUTPUT_DIR/usr/libexec/agent-browser +install -d "$LIBEXEC/bin" "$OUTPUT_DIR/usr/bin" "$OUTPUT_DIR/usr/share/licenses/agent-browser" +install -m 0755 cli/target/release/agent-browser "$LIBEXEC/bin/agent-browser" +cp -R skills skill-data "$LIBEXEC/" +test -f "$LIBEXEC/skill-data/core/SKILL.md" +test -f "$LIBEXEC/skills/agent-browser/SKILL.md" -# Build Rust CLI -cargo build --release --manifest-path cli/Cargo.toml +# Licences of what the binary embeds: axe-core (MPL-2.0, include_str! of +# axe.min.js) with its third-party notices, as upstream's package.json ships +# them; React DevTools' installHook.js (MIT, its notice is in the file). +install -m 0644 LICENSE "$OUTPUT_DIR/usr/share/licenses/agent-browser/LICENSE" +install -m 0644 cli/src/native/a11y/LICENSE-axe-core.txt \ + cli/src/native/a11y/LICENSE-axe-core-THIRD-PARTY.txt \ + "$OUTPUT_DIR/usr/share/licenses/agent-browser/" -# Determine platform -case $(uname -m) in - x86_64) PLATFORM="linux-x64" ;; - aarch64) PLATFORM="linux-arm64" ;; -esac - -mkdir -p bin -cp cli/target/release/agent-browser bin/agent-browser-${PLATFORM} - -# Chromium is provided by the chromium-bin pkg as a runtime dep. We pass its -# binary to the daemon via --executable-path; no need to ship our own copy or -# run `npx playwright install`. It must be chromium-bin's `chromium`, not -# chromium-headless-shell: only the full browser reads the -# CADistrustedCertificates policy (CVE-2026-111943; see build.ncl). +# The wrapper sets two defaults; a caller's own env var wins, and so does a +# command-line flag. # -# Upstream's own default is to fetch Chrome for Testing's `chrome` bundle, -# which we may not redistribute (inbox#284). Passing an explicit -# --executable-path is what stops `agent-browser install` ever reaching for -# it, so this flag is load-bearing for licensing, not just convenience. - -install -d $OUTPUT_DIR/usr/bin -install -d $OUTPUT_DIR/usr/libexec/agent-browser - -# pnpm bakes wall-clock timestamps into its node_modules state files -# (.modules.yaml `prunedAt`, .pnpm-workspace-state-v1.json `lastValidatedTimestamp`) -# — non-deterministic and not needed at runtime. Drop them before packaging. -rm -f node_modules/.modules.yaml node_modules/.pnpm-workspace-state-v1.json -test ! -e node_modules/.pnpm-store \ - || { echo "agent-browser: the pnpm store is inside node_modules and would ship" >&2; exit 1; } -cp -R dist bin node_modules package.json $OUTPUT_DIR/usr/libexec/agent-browser/ - -cat > $OUTPUT_DIR/usr/bin/agent-browser << EOF +# AGENT_BROWSER_EXECUTABLE_PATH -> chromium-bin's full browser, NOT +# chromium-headless-shell: only the full browser reads the +# CADistrustedCertificates policy (CVE-2026-111943; see build.ncl). The env +# var (rather than the old prepended --executable-path) also reaches the +# paths that never parse the flag: the daemon's own auto-launch +# (native/actions.rs), `mcp` mode, and `doctor`. Upstream's fallback is to +# look for google-chrome/chromium on PATH or a Chrome for Testing download +# from `agent-browser install`, which we may not redistribute (inbox#284). +# +# AGENT_BROWSER_USE_SYSTEM_CA=1 -> the CLI's own HTTPS (`read`, which fetches +# arbitrary URLs without a browser, plus `doctor`, `install`, `upgrade`, +# `chat`, plugins) verifies against /etc/ssl/certs (ca-certificates) instead +# of the webpki-roots bundle compiled into the binary (pkgs AGENTS.md "Do not +# embed a trust store"; the locked webpki-roots 1.0.5 predates the +# CVE-2026-111943 emSign distrust, RUSTSEC-2026-0381). +cat > "$OUTPUT_DIR/usr/bin/agent-browser" << 'EOF' #!/bin/bash -exec /usr/libexec/agent-browser/bin/agent-browser-${PLATFORM} \\ - --executable-path /usr/bin/chromium "\$@" +export AGENT_BROWSER_EXECUTABLE_PATH="${AGENT_BROWSER_EXECUTABLE_PATH:-/usr/bin/chromium}" +export AGENT_BROWSER_USE_SYSTEM_CA="${AGENT_BROWSER_USE_SYSTEM_CA:-1}" +exec /usr/libexec/agent-browser/bin/agent-browser "$@" EOF -chmod +x $OUTPUT_DIR/usr/bin/agent-browser +chmod 0755 "$OUTPUT_DIR/usr/bin/agent-browser" From 0c4515ed3820d22f98ac5c57dd5e6bf3d3d2c623 Mon Sep 17 00:00:00 2001 From: bryan Date: Mon, 2 Nov 2026 12:24:33 -0800 Subject: [PATCH 3/8] agent-browser: rename the version test (it shadowed the version binding) Inside the recursive tests record, a field named `version` made %{version} refer to the test record itself. Co-Authored-By: Claude Opus 5.5 --- packages/agent-browser/build.ncl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/agent-browser/build.ncl b/packages/agent-browser/build.ncl index 2d161f897..3b18c6556 100644 --- a/packages/agent-browser/build.ncl +++ b/packages/agent-browser/build.ncl @@ -106,7 +106,7 @@ let version = "0.41.1" in } | Attrs, tests = { - version = + version_check = { class = 'Standalone, test_deps = [base], From 01aa517421a071bd9cf0cfaff93f328d6a6256ae Mon Sep 17 00:00:00 2001 From: bryan Date: Mon, 2 Nov 2026 12:30:41 -0800 Subject: [PATCH 4/8] agent-browser: license_spdx covers the Rust crates the binary links Checked every registry crate in cli/Cargo.lock against crates.io: beyond MIT OR Apache-2.0 the binary links ISC (ring, rustls-webpki, untrusted), Unicode-3.0 (icu_*), BSD-2-Clause (rav1e), BSD-3-Clause (subtle, exr), Zlib (zlib-rs, foldhash), CDLA-Permissive-2.0 (webpki-roots) and MPL-2.0 (option-ext). Co-Authored-By: Claude Opus 5.5 --- packages/agent-browser/build.ncl | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/packages/agent-browser/build.ncl b/packages/agent-browser/build.ncl index 3b18c6556..908ae2c81 100644 --- a/packages/agent-browser/build.ncl +++ b/packages/agent-browser/build.ncl @@ -88,15 +88,22 @@ let version = "0.41.1" in attrs = { upstream_version = version, - # The binary compiles in more than agent-browser's own Apache-2.0 code: - # MPL-2.0 axe-core 4.12.1 (cli/src/native/a11y/axe.min.js, include_str!) - # MIT, ISC axe-core's bundled third-party code (LICENSE-axe-core-THIRD-PARTY.txt) - # MIT React DevTools installHook.js (cli/src/native/react) - # BSD-3-Clause Chrome DevTools Protocol JSON (cli/cdp-protocol, codegen in build.rs) - # OFL-1.1 Geist font, self-hosted into the embedded dashboard by next/font - # dashboard JS next, react, radix-ui, ai, streamdown, … (MIT / ISC / Apache-2.0) - # Rust crates from cli/Cargo.lock (see the PR that bumped to 0.41.1 for the list) - license_spdx = "Apache-2.0 AND MPL-2.0 AND MIT AND ISC AND BSD-3-Clause AND OFL-1.1", + # The binary compiles in more than agent-browser's own Apache-2.0 code + # (checked for 0.41.1; dual-licensed parts counted at MIT/Apache-2.0): + # MPL-2.0 axe-core 4.12.1 (cli/src/native/a11y/axe.min.js, include_str!), + # and the option-ext crate (via dirs) + # MIT, ISC axe-core's bundled third-party code (LICENSE-axe-core-THIRD-PARTY.txt); + # React DevTools installHook.js (cli/src/native/react) + # BSD-3-Clause Chrome DevTools Protocol JSON (cli/cdp-protocol, codegen in build.rs); + # subtle, exr, ravif crates + # OFL-1.1 Geist, which next/font self-hosts into the embedded dashboard + # dashboard JS next, react, radix-ui, ai, streamdown, d3, ... (MIT, ISC, Apache-2.0, + # BSD-3-Clause) + # Rust crates (cli/Cargo.lock) mostly MIT OR Apache-2.0, plus ISC (ring, + # rustls-webpki, untrusted), Unicode-3.0 (icu_*, zerovec, ...), + # BSD-2-Clause (rav1e), Zlib (zlib-rs, foldhash) and + # CDLA-Permissive-2.0 (webpki-roots' root list) + license_spdx = "Apache-2.0 AND MPL-2.0 AND MIT AND ISC AND BSD-2-Clause AND BSD-3-Clause AND Unicode-3.0 AND Zlib AND CDLA-Permissive-2.0 AND OFL-1.1", source_provenance = { category = 'GithubRepo, owner = "vercel-labs", From 382466fbe75525bc7e33ed9cd9434d3d2abf2a1c Mon Sep 17 00:00:00 2001 From: bryan Date: Mon, 2 Nov 2026 12:41:57 -0800 Subject: [PATCH 5/8] agent-browser: the Node daemon went away in 0.20.0, not 0.16 Co-Authored-By: Claude Opus 5.5 --- packages/agent-browser/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/agent-browser/build.sh b/packages/agent-browser/build.sh index b2ac5d604..ca4703319 100755 --- a/packages/agent-browser/build.sh +++ b/packages/agent-browser/build.sh @@ -1,7 +1,7 @@ #!/bin/sh set -eu -# agent-browser >= 0.16 is a native Rust CLI. The npm package's +# agent-browser >= 0.20 is a native Rust CLI (upstream #754). The npm package's # bin/agent-browser.js is only a launcher that picks the per-platform binary # (and scripts/postinstall.js downloads one), so we build the binary from # source and ship it on its own: no node, no node_modules at runtime. From 716bbb8e87d6b22a47b11baf3109c42ba8124f3f Mon Sep 17 00:00:00 2001 From: bryan Date: Mon, 2 Nov 2026 12:47:24 -0800 Subject: [PATCH 6/8] agent-browser: open_check's follow-up command runs in the same shell The daemon does not outlive a test command, so `get title` as its own command met a fresh daemon on about:blank. Co-Authored-By: Claude Opus 5.5 --- packages/agent-browser/build.ncl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/agent-browser/build.ncl b/packages/agent-browser/build.ncl index 908ae2c81..19cc16c6e 100644 --- a/packages/agent-browser/build.ncl +++ b/packages/agent-browser/build.ncl @@ -153,8 +153,9 @@ let version = "0.41.1" in # AGENT_BROWSER_EXECUTABLE_PATH), navigates to a data: URL, and # prints the page title. ["/bin/bash", "-c", "/bin/agent-browser open 'data:text/html,agent-browser-open-ok' | grep -q agent-browser-open-ok"], - ["/bin/bash", "-c", "/bin/agent-browser get title | grep -q agent-browser-open-ok"], - ["/bin/bash", "-c", "/bin/agent-browser close"], + # A follow-up command reaches the same daemon and page. One shell: + # the daemon does not outlive a test command. + ["/bin/bash", "-c", "set -o pipefail; /bin/agent-browser open 'data:text/html,agent-browser-reuse-ok' >/dev/null && /bin/agent-browser get title | grep -q agent-browser-reuse-ok; rc=$?; /bin/agent-browser close >/dev/null; exit $rc"], ], } | Test, # CVE-2026-111943: the daemon must launch chromium-bin's full browser, From 0084f27a655614bf9e37d85520645528d25d0c22 Mon Sep 17 00:00:00 2001 From: bryan Date: Mon, 2 Nov 2026 12:59:00 -0800 Subject: [PATCH 7/8] agent-browser: test that no node runtime ships and the licence texts do Co-Authored-By: Claude Opus 5.5 --- packages/agent-browser/build.ncl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/agent-browser/build.ncl b/packages/agent-browser/build.ncl index 19cc16c6e..c260d4c51 100644 --- a/packages/agent-browser/build.ncl +++ b/packages/agent-browser/build.ncl @@ -133,6 +133,18 @@ let version = "0.41.1" in ["/bin/bash", "-c", "/bin/agent-browser skills get core | grep -q agent-browser"], ], } | Test, + # No Node runtime or node_modules ships any more; the embedded code's + # licence texts do. + layout = + { + class = 'Standalone, + test_deps = [base], + cmds = [ + ["/bin/bash", "-c", "test ! -e /usr/libexec/agent-browser/node_modules && test ! -e /usr/bin/node"], + ["/bin/bash", "-c", "grep -q 'Mozilla Public License' /usr/share/licenses/agent-browser/LICENSE-axe-core.txt"], + ["/bin/bash", "-c", "test -s /usr/share/licenses/agent-browser/LICENSE-axe-core-THIRD-PARTY.txt"], + ], + } | Test, # The real dashboard export is embedded, not cli/build.rs's placeholder. dashboard_embedded = { From fe9d44442c482a52268439c3d9e5baccea25d30d Mon Sep 17 00:00:00 2001 From: bryan Date: Mon, 2 Nov 2026 14:38:00 -0800 Subject: [PATCH 8/8] agent-browser: open_check passes --no-sandbox to chromium (test-only) The build-bot's test sandbox has no unprivileged user namespaces, so Chromium aborted with "No usable sandbox!" on both arches (pkgs#1269 run f870d701). chromium-bin's own launch test passes --no-sandbox for the same reason. Set via AGENT_BROWSER_ARGS inside the two test shells only; the shipped wrapper keeps Chromium's sandbox. Co-Authored-By: Claude Opus 5.5 --- packages/agent-browser/build.ncl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/agent-browser/build.ncl b/packages/agent-browser/build.ncl index c260d4c51..d6a025be5 100644 --- a/packages/agent-browser/build.ncl +++ b/packages/agent-browser/build.ncl @@ -164,10 +164,16 @@ let version = "0.41.1" in # chromium-bin's /usr/bin/chromium headless (the wrapper's # AGENT_BROWSER_EXECUTABLE_PATH), navigates to a data: URL, and # prints the page title. - ["/bin/bash", "-c", "/bin/agent-browser open 'data:text/html,agent-browser-open-ok' | grep -q agent-browser-open-ok"], + # TEST-ONLY --no-sandbox: the build-bot's test sandbox has no + # unprivileged user namespaces, so Chromium aborts with "No usable + # sandbox!" (pkgs#1269 build-bot run, both arches). chromium-bin's own + # launch test does the same. The shipped wrapper keeps Chromium's + # sandbox; AGENT_BROWSER_ARGS (comma-separated launch args, cli + # flags.rs) is set only inside these test shells. + ["/bin/bash", "-c", "export AGENT_BROWSER_ARGS=--no-sandbox,--disable-dev-shm-usage; /bin/agent-browser open 'data:text/html,agent-browser-open-ok' | grep -q agent-browser-open-ok"], # A follow-up command reaches the same daemon and page. One shell: # the daemon does not outlive a test command. - ["/bin/bash", "-c", "set -o pipefail; /bin/agent-browser open 'data:text/html,agent-browser-reuse-ok' >/dev/null && /bin/agent-browser get title | grep -q agent-browser-reuse-ok; rc=$?; /bin/agent-browser close >/dev/null; exit $rc"], + ["/bin/bash", "-c", "set -o pipefail; export AGENT_BROWSER_ARGS=--no-sandbox,--disable-dev-shm-usage; /bin/agent-browser open 'data:text/html,agent-browser-reuse-ok' >/dev/null && /bin/agent-browser get title | grep -q agent-browser-reuse-ok; rc=$?; /bin/agent-browser close >/dev/null; exit $rc"], ], } | Test, # CVE-2026-111943: the daemon must launch chromium-bin's full browser,