fix(deps): resolve open Dependabot alerts
Summary
Resolves all 13 open Dependabot alerts (all npm), including 3 critical:
| Package | Bump | Manifests | Alerts |
|---|---|---|---|
simple-git | 3.36.0 → 4.0.2 | apps/desktop, packages/host-service | #317, #321 (critical): unsafe-operation guard misses trailer command config · #316, #320 (high): command execution through Git config includes · #315, #319 (high): unsafe-operations bypass through abbreviated long options |
shell-quote | 1.9.0 → 1.11.0 | apps/desktop, root overrides | #322 (critical): quote() command injection via a line terminator after a { comment } token |
@modelcontextprotocol/sdk | 1.30.0 → 1.31.0 | apps/api, apps/docs, packages/cli, packages/mcp, packages/trpc | #323–#327 (high): OAuth client could send credentials to an authorization server chosen by the MCP server |
katex | 0.17.0 → 0.18.2 | apps/mobile | #318 (low): prototype pollution can bypass trust restrictions |
Also adds a root override @modelcontextprotocol/sdk: 1.31.0, so the copies under expo-mcp and shadcn (both ^1.26.0) move to the patched version too.
This replaces the Dependabot PRs #8197, #8198 and #8211. #8197 bumped simple-git in host-service only (red on Typecheck/Test/Sherif). #8211 left the root shell-quote: 1.9.0 override in place, so the lockfile still resolved 1.9.0.
simple-git 4 migration
simple-git 4 is a major version, so this is more than a version pin:
- Named export. v4 removes the default export:
import simpleGit from "simple-git"→import { simpleGit } from "simple-git"(2 wrappers + 21 test files). - Environment guard. v4 throws when a
GIT_*,EDITOR,PAGER,PREFIX,SSH_ASKPASSorVISUALkey reaches the child through.env()unless the key is listed inallowEnvironment, and it strips such keys inherited fromprocess.env. That list is read once, when the instance is built. Today the desktop passes the whole shell env through.env(), and host-service chains.env(gitEnv)(withGIT_ASKPASS,GIT_TERMINAL_PROMPT,GIT_OPTIONAL_LOCKS, …) ontocreateUserSimpleGit()at about 25 call sites. A plain bump would make every credentialed git call, and any desktop git call for a user withEDITORset, fail at runtime withUse of "EDITOR" is blocked by the environment guard. Typecheck does not catch this.- New
userGitSimpleGitOptions(env)in@superset/shared/simple-git-optionsbuildsallowEnvironmentfrom the env being passed. - Host-service
createUserSimpleGit(baseDir, { env })takes the env at construction, and every.env()chain moves to that option. Called withoutenv, it allows the ambientprocess.envkeys, as v3 did. - The desktop
getSimpleGitWithShellPathresolves the shell env first, then builds the client with it.
- New
- Unsafe flags. Adds the v4 flags (
allowUnsafeCommandBinaries,allowUnsafeExec,allowUnsafeInclude,allowUnsafeSubmodule,allowUnsafeUrlRewrite,allowAbbreviatedOptions) to the shared allow-list.
Reviewer note on policy: this keeps the policy from #4602, where Superset is the user's own Git client and honors their Git env and config, so every simple-git unsafe guard is enabled. The alerts close because the vulnerable versions are gone, but the new v4 argument guards stay opted out, as the v3 ones already were. allowAbbreviatedOptions is included because otherwise v4 sets GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=true in git's env, and that reaches the user's own hooks. If we want to narrow the policy for calls that carry untrusted input (PR head refs, remote URLs), that should be a separate change.
Other bumps
@modelcontextprotocol/sdk1.31.0 adds anissuerfield to stored OAuth tokens. No code here uses the SDK's OAuth client storage.katex0.18.0 prefixes its internal CSS classes. In mobile, katex is only an optional peer ofreact-native-enriched-markdown, which uses it in its web renderer, and the app is iOS-only.mermaidstill pulls its ownkatex@0.16.47(^0.16.47excludes 0.18.x). Dependabot does not flag it; it clears when mermaid widens its range.
Test plan
-
bun install: lockfile changes only the bumped packages; native modules rebuilt -
bun run lint:fixandbun run lint: clean -
bun run sherif: no issues -
bun run typecheck: clean in shared, host-service, desktop, trpc, mcp, cli, api and docs (after relinking this checkout withbun@1.4.2 install --frozen-lockfile --ignore-scriptsto repair a local better-auth install split; no tracked files change).apps/mobile(afterhost-service build:types) has 11 errors, allunrefonnumberinpackages/port-scannerandpackages/workspace-fs, which this PR does not touch. Under the earlier local install, mobile's error set was identical tomain. -
packages/host-servicetests: 2312 pass, 0 fail -
packages/sharedtests: 1303 pass, 0 fail -
packages/trpc(492),packages/cli(372),apps/api(230): all pass -
apps/desktoptests: 7684 pass, 209 fail. All 209 are the known local Bun 1.3.14--isolateLingui shim failures ("useLingui hook was used without I18nProvider" / "without setting a locale"); none are in git code and none mention simple-git - New regression test:
createUserSimpleGit(…, { env })passesGIT_CONFIG_*through to git. Checked by mutation: it fails withallowEnvironmentemptied - Manual smoke test of desktop git flows (status, commit, push over SSH/HTTPS) on a dev build. Not run in this session
Summary by CodeRabbit
- Bug Fixes
- Git operations now consistently use the environment settings provided for each operation, including Git configuration and credentials. This helps ensure actions such as cloning, fetching, and checking repository status run with the intended settings.