[PR #8776] [MERGED] fix(deps): override glob and minimatch to their fixed majors #8799

Closed
opened 2026-11-07 17:39:47 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8776
Author: @SpicyMarinara
Created: 11/3/2026
Status: ✅ Merged
Merged: 11/3/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/dependency-audit-glob-minimatch


📝 Commits (1)

  • c10139a fix(deps): override glob and minimatch to their fixed majors

📊 Changes

3 files changed (+85 additions, -93 deletions)

View changed files

📝 pnpm-lock.yaml (+26 -93)
📝 pnpm-workspace.yaml (+4 -0)
➕ scripts/regressions/glob-minimatch-security-overrides.regression.mjs (+55 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.

Linked issue

Closes #8769

Why this change

The release-candidate dependency check (pnpm audit --audit-level low in security-audit.yml, named in SECURITY.md) fails on two moderate advisories. GHSA-3g3m-2fjr-6pw4 affects glob through @fastify/static and workbox-build. GHSA-g3hv-75wg-m249 affects minimatch through pi-coding-agent, eslint, typescript-eslint, glob and filelist. No untrusted input reaches either one: callers use constant or repo-authored patterns and pass no AbortSignal. Still, the failing gate blocks a release. The audit job also skips its own regression:security step on PRs that touch dependency files. The fixes exist only in the glob 14 and minimatch 11 majors, and no parent package has adopted them yet, so scoped overrides are needed. There is no linked issue; one should be opened (or this finding referenced) before the PR is submitted.

What changed

  • Nothing that worked before stops working. Every consumer's call is still exported by the new majors, and the PWA precache list and production startup are unchanged.
  • Adds overrides in pnpm-workspace.yaml so that every consumer installs glob 14.0.3 and minimatch 11.0.4. The lockfile now holds one copy of each, replacing glob 11.1.0 and 13.0.6 and minimatch 10.2.6 and 5.1.9.
  • pnpm audit --audit-level low passes again. The only remaining ignored advisories are the existing, reviewed zod and deepmerge exemptions.
  • Adds a regression in the security lane, scripts/regressions/glob-minimatch-security-overrides.regression.mjs. It fails if any glob or minimatch version older than the fix is installed. It also runs each consumer's exact call through that consumer's own dependency chain: @fastify/static, workbox-build, pi-coding-agent and filelist.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually verify that pnpm install --frozen-lockfile followed by pnpm audit --audit-level low exits 0 in the Security Audit GitHub workflow.
  • Manually verify in a browser that a production build (pnpm build, then node packages/server/dist/index.js) serves the app, its hashed /assets files and a reload. This path relies on @fastify/static walking client/dist with glob 14.
  • Manually verify that the installed PWA still updates and works offline after a fresh build (workbox-build now globs the precache list with glob 14).
  • Manually verify that pnpm lint reports the same results on a clean ESLint cache (eslint now matches its config files with minimatch 11).
  • Manually verify that Professor Mari model-scope and package filters still match as before, if those paths are ever enabled. pi-coding-agent pinned minimatch 10.2.6 exactly and is now overridden to 11.0.4.

Agent-run checks (for reference; each regression was shown to fail without its fix):

  • node ./scripts/pnpm-runner.mjs audit --audit-level low (before fix): exit 1: 2 moderate (GHSA-g3hv-75wg-m249 minimatch, GHSA-3g3m-2fjr-6pw4 glob)
  • node ./scripts/pnpm-runner.mjs install (with overrides), then install --frozen-lockfile: both exit 0; lockfile has single glob@14.0.3 and minimatch@11.0.4
  • node ./scripts/pnpm-runner.mjs audit --audit-level low (after fix): exit 0; 'All found vulnerabilities were already reviewed and decided to be ignored', 2 ignored (existing zod/deepmerge)
  • node ./scripts/pnpm-runner.mjs build:shared: exit 0
  • node ./scripts/run-regressions.mjs --filter glob-minimatch-security-overrides (fix reverted via git stash of pnpm-workspace.yaml + pnpm-lock.yaml and frozen rei: FAILED: AssertionError glob@11.1.0 predates the fix (reproduced twice)
  • node ./scripts/run-regressions.mjs --filter glob-minimatch-security-overrides (with fix): 1/1 passed
  • node ./scripts/run-regressions.mjs --filter static-cache-headers: 1/1 passed (@fastify/static wildcard:false registration over a temp client dist, now on glob 14)
  • node ./scripts/run-regressions.mjs --filter security-backport: 2/2 passed (zod and deepmerge backport guards, audit.ignore unchanged)
  • node ./scripts/pnpm-runner.mjs regression:security: exit 0; security filter 33/33 passed (includes new regression), runtime-integrity, shell-sandbox, extension-ipc, android-local-auth, docker-proxy-auth each 1/1
  • node ./scripts/run-regressions.mjs --filter professor-mari: 27/27 passed (includes pi-runtime, which loads pi-coding-agent on minimatch 11)
  • node ./scripts/pnpm-runner.mjs check: exit 0 (impeccable, localization, format:check, lint incl. eslint on minimatch 11 and server/client tsc, e2e/token types, full build; PWA precache 519 entries)
  • client build before vs after override (packages/client node ./scripts/build.mjs), compared precache URL lists in dist/sw.js: old 519 / new 519 entries, identical URL lists (workbox-build globSync on glob 14 unchanged)

Independent adversarial review: approve.

Known limits and risks:

Forcing new majors: minimatch 11 replaces its regex engine with @isaacs/nonrecursive-glob-match and removes makeRe. No consumer here calls makeRe, but edge-case matching may differ subtly. The PWA precache list, eslint, Mari and production-startup checks showed no difference. pi-coding-agent pins minimatch 10.2.6 exactly, and the override goes beyond that pin. filelist expected minimatch 5 (whose CJS export is a function) but only calls .match, which 11 still exports, and it is reached only through the ejs CLI. The brace-expansion@>=2 <2.1.7 override no longer matches anything (brace-expansion 2 left the tree); I left it in place because the file says to keep existing overrides. I did not run pnpm smoke:ui (dev servers on shared fixed ports); smoke:production covers the @fastify/static path. Out of scope for this step: the user's relayed request to make showing an outfit to a love interest in Otome Hearth give +5 affection instead of +20 is NOT done here. Otome Hearth (otome-forge) is a downloadable package, and the outfit-affection logic is not in this Marinara Engine worktree; a search found only unrelated matches such as gotoMessage. Under AGENTS.md that change belongs in Pasta-Devs/Marinara-Agents (staging), so the orchestrator or user still needs to route it there.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/8776 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 11/3/2026 **Status:** ✅ Merged **Merged:** 11/3/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/dependency-audit-glob-minimatch` --- ### 📝 Commits (1) - [`c10139a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c10139ae80363edbbbf2a3de594b1670ac90e66f) fix(deps): override glob and minimatch to their fixed majors ### 📊 Changes **3 files changed** (+85 additions, -93 deletions) <details> <summary>View changed files</summary> 📝 `pnpm-lock.yaml` (+26 -93) 📝 `pnpm-workspace.yaml` (+4 -0) ➕ `scripts/regressions/glob-minimatch-security-overrides.regression.mjs` (+55 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. ## Linked issue Closes #8769 ## Why this change The release-candidate dependency check (`pnpm audit --audit-level low` in security-audit.yml, named in SECURITY.md) fails on two moderate advisories. GHSA-3g3m-2fjr-6pw4 affects glob through @fastify/static and workbox-build. GHSA-g3hv-75wg-m249 affects minimatch through pi-coding-agent, eslint, typescript-eslint, glob and filelist. No untrusted input reaches either one: callers use constant or repo-authored patterns and pass no AbortSignal. Still, the failing gate blocks a release. The audit job also skips its own `regression:security` step on PRs that touch dependency files. The fixes exist only in the glob 14 and minimatch 11 majors, and no parent package has adopted them yet, so scoped overrides are needed. There is no linked issue; one should be opened (or this finding referenced) before the PR is submitted. ## What changed - Nothing that worked before stops working. Every consumer's call is still exported by the new majors, and the PWA precache list and production startup are unchanged. - Adds overrides in pnpm-workspace.yaml so that every consumer installs glob 14.0.3 and minimatch 11.0.4. The lockfile now holds one copy of each, replacing glob 11.1.0 and 13.0.6 and minimatch 10.2.6 and 5.1.9. - `pnpm audit --audit-level low` passes again. The only remaining ignored advisories are the existing, reviewed zod and deepmerge exemptions. - Adds a regression in the security lane, scripts/regressions/glob-minimatch-security-overrides.regression.mjs. It fails if any glob or minimatch version older than the fix is installed. It also runs each consumer's exact call through that consumer's own dependency chain: @fastify/static, workbox-build, pi-coding-agent and filelist. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Manually verify that `pnpm install --frozen-lockfile` followed by `pnpm audit --audit-level low` exits 0 in the Security Audit GitHub workflow. - Manually verify in a browser that a production build (`pnpm build`, then `node packages/server/dist/index.js`) serves the app, its hashed /assets files and a reload. This path relies on @fastify/static walking client/dist with glob 14. - Manually verify that the installed PWA still updates and works offline after a fresh build (workbox-build now globs the precache list with glob 14). - Manually verify that `pnpm lint` reports the same results on a clean ESLint cache (eslint now matches its config files with minimatch 11). - Manually verify that Professor Mari model-scope and package filters still match as before, if those paths are ever enabled. pi-coding-agent pinned minimatch 10.2.6 exactly and is now overridden to 11.0.4. Agent-run checks (for reference; each regression was shown to fail without its fix): - `node ./scripts/pnpm-runner.mjs audit --audit-level low (before fix)`: exit 1: 2 moderate (GHSA-g3hv-75wg-m249 minimatch, GHSA-3g3m-2fjr-6pw4 glob) - `node ./scripts/pnpm-runner.mjs install (with overrides), then install --frozen-lockfile`: both exit 0; lockfile has single glob@14.0.3 and minimatch@11.0.4 - `node ./scripts/pnpm-runner.mjs audit --audit-level low (after fix)`: exit 0; 'All found vulnerabilities were already reviewed and decided to be ignored', 2 ignored (existing zod/deepmerge) - `node ./scripts/pnpm-runner.mjs build:shared`: exit 0 - `node ./scripts/run-regressions.mjs --filter glob-minimatch-security-overrides (fix reverted via git stash of pnpm-workspace.yaml + pnpm-lock.yaml and frozen rei`: FAILED: AssertionError glob@11.1.0 predates the fix (reproduced twice) - `node ./scripts/run-regressions.mjs --filter glob-minimatch-security-overrides (with fix)`: 1/1 passed - `node ./scripts/run-regressions.mjs --filter static-cache-headers`: 1/1 passed (@fastify/static wildcard:false registration over a temp client dist, now on glob 14) - `node ./scripts/run-regressions.mjs --filter security-backport`: 2/2 passed (zod and deepmerge backport guards, audit.ignore unchanged) - `node ./scripts/pnpm-runner.mjs regression:security`: exit 0; security filter 33/33 passed (includes new regression), runtime-integrity, shell-sandbox, extension-ipc, android-local-auth, docker-proxy-auth each 1/1 - `node ./scripts/run-regressions.mjs --filter professor-mari`: 27/27 passed (includes pi-runtime, which loads pi-coding-agent on minimatch 11) - `node ./scripts/pnpm-runner.mjs check`: exit 0 (impeccable, localization, format:check, lint incl. eslint on minimatch 11 and server/client tsc, e2e/token types, full build; PWA precache 519 entries) - `client build before vs after override (packages/client node ./scripts/build.mjs), compared precache URL lists in dist/sw.js`: old 519 / new 519 entries, identical URL lists (workbox-build globSync on glob 14 unchanged) Independent adversarial review: approve. Known limits and risks: Forcing new majors: minimatch 11 replaces its regex engine with @isaacs/nonrecursive-glob-match and removes makeRe. No consumer here calls makeRe, but edge-case matching may differ subtly. The PWA precache list, eslint, Mari and production-startup checks showed no difference. pi-coding-agent pins minimatch 10.2.6 exactly, and the override goes beyond that pin. filelist expected minimatch 5 (whose CJS export is a function) but only calls `.match`, which 11 still exports, and it is reached only through the ejs CLI. The `brace-expansion@>=2 <2.1.7` override no longer matches anything (brace-expansion 2 left the tree); I left it in place because the file says to keep existing overrides. I did not run `pnpm smoke:ui` (dev servers on shared fixed ports); smoke:production covers the @fastify/static path. Out of scope for this step: the user's relayed request to make showing an outfit to a love interest in Otome Hearth give +5 affection instead of +20 is NOT done here. Otome Hearth (otome-forge) is a downloadable package, and the outfit-affection logic is not in this Marinara Engine worktree; a search found only unrelated matches such as `gotoMessage`. Under AGENTS.md that change belongs in Pasta-Devs/Marinara-Agents (staging), so the orchestrator or user still needs to route it there. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 17:39:47 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8799
No description provided.