## Problem
`scripts/fix-audit-vulnerability.ts --json` is meant to print a single
JSON object to stdout. In practice, after any failed fix attempt, the
next run printed pnpm install output (`Scope: all 31 workspace
projects`, `Lockfile is up to date...`, `Done in ...`) before the JSON,
so `JSON.parse(stdout)` failed.
The script itself already routes its logs to stderr and pipes every
`execSync`. The extra output comes from pnpm: when a failed attempt is
reverted, the script restores `pnpm-lock.yaml` / `pnpm-workspace.yaml`
from a snapshot but leaves `node_modules` on the bumped versions. On the
next `pnpm tsx ...` call, pnpm sees `node_modules` out of sync with the
lockfile, runs an install before starting the script, and prints it to
stdout.
## Solution
- Add `syncNodeModules()` to `scripts/bump-package.ts`. It runs `pnpm
install --frozen-lockfile --silent` with piped output, and only logs a
warning to stderr if it fails.
- Call it after every revert: in `bumpPackage`'s `revert()` and in the
three lockfile-restore paths of `fixModule` in
`scripts/fix-audit-vulnerability.ts`. `node_modules` now matches the
restored lockfile after a failed attempt.
- Recommend `pnpm --silent tsx ...` in the usage text. Even when
`node_modules` is out of sync for another reason (a fresh pull, for
example), `--silent` keeps pnpm's own output off stdout.
## Review instructions
No UI. Verify from the repo root:
1. Run `pnpm tsx scripts/fix-audit-vulnerability.ts --json 2>/dev/null |
node -e 'JSON.parse(require("fs").readFileSync(0,"utf8"))'` and confirm
it exits 0.
2. Pick a dependency from that list that the script cannot fix (it
returns `still_vulnerable`), and run `pnpm tsx
scripts/fix-audit-vulnerability.ts <dep> --json 2>/dev/null` twice. Both
runs print only a JSON object to stdout.
3. After the failed attempt, `git status` shows no change to
`pnpm-lock.yaml` or `pnpm-workspace.yaml`, and `pnpm install
--frozen-lockfile` reports `Already up to date`.
4. `touch pnpm-lock.yaml && pnpm --silent tsx
scripts/fix-audit-vulnerability.ts --json 2>/dev/null` still parses as
JSON.
5. Progress logs still appear on stderr.
Checks run: the steps above, end to end; Prettier on both files; `tsc
--noEmit` on both files shows only an existing error at the final
`result.status` access in `main()`, which master also has. `turbo
typecheck`/`lint` pass but cover no package, because root `scripts/` is
not a workspace package.
## Checklist
Check all before review:
- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
[FE-4918](https://linear.app/supabase/issue/FE-4918/bump-a-single-vulnerable-dependency)
Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
## Summary
- Bumps vulnerable transitive dependencies flagged by `pnpm audit`, one
commit per dependency (lockfile only, no permanent overrides):
proxy-addr, shell-quote, @fastify/busboy,
@graphql-tools/executor-legacy-ws, @modelcontextprotocol/sdk,
compression, http-cache-semantics, source-map-js, smol-toml, dompurify.
- Updates `scripts/fix-audit-vulnerability.ts` to be agent-friendly:
accepts a dependency name argument, adds `--json` (single JSON object on
stdout, logs on stderr, never prompts) and `--help`.
## Not fixed
The remaining audit findings could not be resolved by this script. Some
are blocked by `minimumReleaseAge` (braces, node-forge, sprintf-js);
others stay vulnerable even with an override and need a parent
dependency update or scoped override.
## Test plan
- [ ] CI passes (typecheck, lint, prettier)
- [ ] `pnpm audit` shows fewer findings than on master
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This PR bumps various dependencies to fix vulnerabilities.
The logic for bumping packages has been taken out of
`fix-audit-vulnerability` into a `bump-package` script.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
* **Chores**
* Removed unused development dependency from generator package
* Updated package version overrides and vulnerability management
configuration to address security concerns
* Enhanced internal package dependency maintenance tooling for improved
operational efficiency
<!-- end of auto-generated comment: release notes by coderabbit.ai -->