Skip to content

Patch eval FTP parsing and remove stale lock entries - #1681

Merged
max-sixty merged 2 commits into
mainfrom
codex/hosted-publication-diagnostics
Oct 3, 2026
Merged

max-sixty merged 2 commits into
mainfrom
codex/hosted-publication-diagnostics

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Leaf's eval dependency tree installed a vulnerable FTP directory-listing parser through Promptfoo → proxy-agent → get-uri. Scope an npm override to get-uri's basic-ftp dependency and select 6.2.1, which fixes CVE-2026-102990. The latest get-uri still requests basic-ftp 5.x; upstream #502 tracks that constraint.

Regenerating the lock also removes 14 unused entries already marked extraneous, including the unused braces dependency reported in alert #20. Basic-ftp is the only retained package whose version changes. Two MongoDB optional-peer entries previously marked extraneous are retained with npm 10's required optional/peer metadata so CI can install the lockfile. Existing platform-specific libc selectors are preserved. Node-forge remains installed and alert #19 remains unresolved. These findings came from October's review tracker.

Validation: clean npm 10.9.9 installs with full scripts and with --ignore-scripts --omit=optional; all six eval assertion tests; 81 focused Python eval-runner tests; one real Promptfoo echo evaluation through Leaf's runner; pre-commit and diff checks. Actual local FTP sessions through installed get-uri retrieve identical bytes with both MDTM and MLSD fallback. A crafted 128 KiB Unix LIST entry blocks past a 10-second subprocess deadline on basic-ftp 5.3.1; the patched dependency returns the expected missing-timestamp error in 0.13 seconds. This exercises the parser through get-uri's real fallback rather than replacing its calls.

Basic-ftp 6 rejects separate transfer hosts by default, providing its FTP bounce-attack protection. Ordinary local passive transfers pass the compatibility check.

This was written by Codex on behalf of max-sixty

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The lockfile drops mongoose/node_modules/gcp-metadata and mongoose/node_modules/google-logging-utils, but npm still requires those entries for MongoDB's optional peer dependency. npm ci --prefix evals now stops with “Missing: [email protected]” and “Missing: [email protected]”; the PR's test job stops at the same step, before any eval assertion runs. Please regenerate the lockfile so a clean install succeeds while retaining the basic-ftp override.

@max-sixty
max-sixty merged commit 00258e1 into main Oct 3, 2026
4 checks passed
@max-sixty
max-sixty deleted the codex/hosted-publication-diagnostics branch October 3, 2026 20:27
leaf-agent added a commit that referenced this pull request Nov 14, 2026
…r Dependabot alerts (#5940)

Clears the six open Dependabot alerts for `hono` (#109–#113, fixed in
4.13.16) and `basic-ftp` (#107, fixed in 6.2.4). Both are
development-only transitives of the eval stack. Dependabot's own
security updates for both failed on 2026-11-13 (runs
[43392104554](https://github.com/max-sixty/leaf/actions/runs/43392104554)
and
[43392104839](https://github.com/max-sixty/leaf/actions/runs/43392104839)),
so nothing else was going to open this PR.

- **basic-ftp**: `package.json` pins it through the scoped override
`get-uri>basic-ftp`, which #1681 added because `get-uri` still asks for
5.x. That exact pin is why Dependabot couldn't update it. This PR moves
the pin from 6.2.1 to 6.2.6, the latest release in the same major that
#1681 picked.
- **hono**: nothing pins it. Every dependant asks for a range (`^4.11.4`
from `@modelcontextprotocol/sdk`, `^4 || ^5` from `@hono/node-server`),
and the lockfile had simply resolved 4.13.12. `pnpm update hono --depth
Infinity --lockfile-only` moved it to 4.13.18.

The lockfile changes nothing beyond those two packages. Verification:
`pnpm install --frozen-lockfile` succeeds. `@hono/node-server` 2.1.8
`serve()` with hono 4.13.18 answered a request with 200. The `basic-ftp`
that `get-uri` resolves loads as 6.2.6 and exports `Client`.

Co-authored-by: leaf-agent <[email protected]>
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.

2 participants