Skip to content

fix: override vulnerable eval glob and minimatch versions - #1635

Closed
tend-agent wants to merge 2 commits into
mainfrom
fix/issue-1632
Closed

tend-agent wants to merge 2 commits into
mainfrom
fix/issue-1632

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Pin the eval dependency tree to glob 14.0.2 and minimatch 11.0.1 with npm overrides. Promptfoo 0.125.1 still constrains both packages to the vulnerable previous majors, directly and through its pinned MCP filesystem server, so a lockfile refresh alone cannot resolve the alerts.

Compatibility checks passed on Node 22.23.4: a fresh install, all six eval capture/provider tests, a local Promptfoo CLI evaluation loading a prompt through a wildcard path (1 passed, 0 errors), and MCP filesystem search covering recursive patterns, dotfiles and exclusions. npm audit --json reports both packages before this change and neither afterward; this does not claim the other dependency alerts are resolved.

Major-version compatibility review

The upstream changelogs replace regexp-based matching and remove APIs including minimatch's makeRe() and glob's Pattern.isRegExp(). The published Promptfoo ESM entry points use globSync, escape, hasMagic, and the minimatch function; the MCP filesystem server uses the minimatch function for search and exclusions. The exercised paths retain these APIs. Glob's dependency update also brings path-scurry 3 and the new nonrecursive matcher into the lockfile.

The Promptfoo smoke used a temporary JSON config with a file://…/prompts/*.txt prompt, a local provider returning its input, and an equals assertion on the rendered prompt. It used --no-cache --no-share with telemetry and update checks disabled; no model call was made. The MCP smoke searched a temporary tree for **/*.txt with ignored/** excluded and asserted the exact results, including a dotfile and a nested file. These checks cover the eval loading and filesystem search paths, rather than every feature of Promptfoo.

Closes #1632 — automated triage

max-sixty pushed a commit that referenced this pull request Nov 13, 2026
….13.18 (#1682)

This PR fixes the two open `@hono/node-server` security alerts in the
eval tree (alerts 109 and 110: GHSA-jpvv-r467-5p4w and
GHSA-qv5m-9pm6-hqp3, both fixed in 2.1.6). Dependabot can't fix them on
its own because `[email protected]` pins `@hono/node-server` to exactly
`2.1.5`, which is also the latest promptfoo release. Dependabot's two
update runs for these alerts failed with "the available update path
would downgrade promptfoo from 0.125.1 to 0.121.20". So the PR adds an
npm override pinning `@hono/node-server` to `2.1.6`. It also refreshes
`hono` from 4.13.12 to 4.13.18 within the existing `^4` ranges, which
clears five Hono advisories that `npm audit` reports. Those five were
published at the same time and have no Dependabot alert yet.

Verified locally:
- `npm ci` from the new lockfile resolves one `@hono/[email protected]`
and one `[email protected]` for both promptfoo and
`@modelcontextprotocol/sdk`.
- `npm --prefix evals test` passes 6 of 6.
- `promptfoo view`, the promptfoo path that serves through
`@hono/node-server`, started, and `/` and `/health` both returned 200.
- `npm audit` no longer lists `@hono/node-server` or `hono`. The other
eval findings are unchanged (`basic-ftp`/`get-uri`, tracked in #1520;
`glob`/`minimatch`, #1635).

Both this PR and #1635 add entries to the `overrides` block in
`evals/package.json`, so whichever merges second gets a one-line
conflict there.

Co-authored-by: tend-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Nov 18, 2026
….2.6 (#1706)

This PR clears the three open `basic-ftp` security alerts in the eval
tree (Dependabot alerts 50, 111 and 112; the highest patched version
among them is 6.2.4). The blocker #1520 tracked is gone upstream:
`get-uri` 8.0.2 widened its `basic-ftp` range from `^5.3.1` to `^6.2.4`,
and `proxy-agent` 8.0.3 reaches it through `pac-proxy-agent` 9.1.1.
`[email protected]` already accepts `proxy-agent@^8.0.0`, so `npm update
proxy-agent` moves `basic-ftp` from 5.3.1 to 6.2.6 without an override
and without touching `package.json`.

The lockfile change stays inside that one dependency chain:
`proxy-agent` 8.0.3, `pac-proxy-agent` 9.1.1, `get-uri` 8.0.2,
`pac-resolver` 9.0.2, `degenerator` 7.0.2, `basic-ftp` 6.2.6, and
`quickjs-wasi` 2.2.0 → 3.7.0. The `quickjs-wasi` major comes from the
new `pac-resolver`/`degenerator` releases, which require `^3.0.0`.

Verified locally:
- `npm --prefix evals test` passes 7 of 7, and `npx promptfoo --version`
still starts and reports 0.124.1.
- A smoke script loaded `proxy-agent` and `basic-ftp`, fetched a `data:`
URI through `get-uri`, and evaluated a PAC script through
`pac-proxy-agent` (the path that runs on `quickjs-wasi` 3), which
returned `DIRECT`.
- `npm audit` no longer lists `basic-ftp` or `get-uri`. The only
remaining findings are `glob`/`minimatch`, which #1635 covers.

There is no regression test because this is a lockfile-only change; the
Dependabot alerts closing after merge confirm it. This PR and #1635 both
edit `evals/package-lock.json`, but they change different entries and
test-merge cleanly.

Fixes #1520

Co-authored-by: tend-agent <[email protected]>
@max-sixty

Copy link
Copy Markdown
Owner

Closing in favour of bumping promptfoo to 0.126.0, which depends on glob ^14.0.3, minimatch ^11.0.8 and @hono/node-server 2.1.6 itself, so alerts 100 and 106 clear with no overrides. Its Codex SDK check accepts >=0.156.1 <0.170.0, so the pinned codex-sdk 0.160.0 passes and the 0.124.1 pin from #1689 can lift. I've asked for the bump on #1632.

This was written by Claude Code on behalf of max-sixty

@max-sixty max-sixty closed this Nov 27, 2026
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.

Resolve blocked glob and minimatch security updates in evals

2 participants