Skip to content

Dependency Security Remediation TODO

Purpose

This document tracks dependency migrations and the evidence required to verify them. The root workspace lock and the standalone MCP UI lock are versioned; the repository template's development lock is not. Reassess remaining advisories against the committed root lock and the production-artifact graph, and do not reuse advisory counts from earlier lock snapshots as current results.

These items require parent-package or workflow migrations. They MUST NOT be closed with untested major-version overrides because the affected packages participate in deployment, archive extraction, native module installation, and developer tunneling.

Checkmarx follow-up

The root workspace lock is committed so CI can install with npm ci and so scanners see the exact resolved graph; the repository template's development lock MUST remain local, following AGENTS.md. The root .gitignore excludes only the template lock; it MUST NOT exclude the root lock or the standalone UI lock, or force generated applications to ignore their own locks. Verification: git check-ignore --no-index for all three paths and tests/cliTemplateSecurity.unit.test.ts for generated-project behavior.

When regenerating the root lock against the internal Nexus mirror, the mirror may lag the public registry for some @aws-sdk/* packages, so a plain npm install can fail with ETARGET. In that case resolve with npm install --package-lock-only --ignore-scripts --before=<timestamp>, choosing a timestamp at which every required package exists in the mirror, in a clean directory containing only the manifests (a populated node_modules produces a lock without integrity values). Keep omit-lockfile-registry-resolved=true, confirm the lock contains no mirror host names and has integrity entries, and confirm npm ci --dry-run succeeds against the mirror. Re-resolve with a newer timestamp once the mirror catches up.

SCA inputs MUST retain the lock from the verified installation: the committed root lock, plus the production-artifact lock generated during the build. Keep the source revision, Node/npm versions, registry identity, resolved dependency output, and production-artifact lock or SBOM together. A source-only archive without these generated records does not establish the deployed graph. Install before building; existing root builders copy the generated local lock into their artifact, and the production install updates that artifact's graph. The template builder copies an application lock when present and also supports a repository workspace without its own nested lock. Verification: tests/serverlessInstallFailure.unit.test.ts, a fresh root install, and dependency inspection in the built artifact.

Object API responses MUST retain their JSON data and MIME type, including debug envelopes; do not HTML-escape CRM fields to silence a reflected-XSS query. Verification: packages/core/test/routes/jsonResponseSecurity.test.ts and tests/pluginRoutes.int.test.ts.

The unused bundled Google Drive recording-upload example has been removed, including its OAuth routes, upload dispatch, credential model, and file model. Existing database tables are not automatically dropped. Verification: tests/pluginRoutes.int.test.ts checks that the former OAuth routes are unavailable and the removed plugin is rejected; tests/e2e/pluginServices.test.ts verifies the remaining all-cap example. Checkmarx closure still requires a scan of a revision containing the removal.

Local report storage MUST require explicit opt-in and externally configured MinIO credentials. Missing optional storage MUST NOT prevent unrelated server startup or leave an upload-URL request unanswered. Deployment configuration and verification are documented in the deployment guide.

The root, connector template, plugin template, and CLI MUST carry compatible security minimums at their own installation boundaries. Root workspace overrides do not propagate into applications generated from a standalone template. The CLI therefore does not copy the repository's template development package-lock.json; the generated application creates its own lock during installation. Verification: tests/cliTemplateSecurity.unit.test.ts exercises both archive-based generation paths and preserves manifest dependencies/overrides.

Runtime UUID and Debug upgrades MUST remain scoped to their inspected consumers. Verification: tests/dependencySecurity.unit.test.ts covers UUID buffer bounds, Sequelize defaults/transactions, Google multipart boundaries and HTTP middleware behavior. Transformer cache keys use SHA-256; diagnostic request IDs use cryptographic entropy without changing their prefix envelope. Verification: tests/transformerCache.unit.test.ts and packages/core/test/lib/debugTracer.test.ts.

Standalone registry verification of the connector template still depends on the configured mirror making its requested Core version available. A local pack of the current workspace can validate source compatibility, but MUST NOT be represented as evidence that a registry release exists. Publishing and registry synchronization remain separate release checks.

Widget security changes MUST reach the compiled/published Core artifact, not only the source checkout. Verification: tests/compiledWidgetAsset.unit.test.ts binds both compiled widget copies to the tracked UI build; inspect the corresponding dist/mcp/ui/dist/index.html entry in the local npm pack before release.

Compatible dependency fixes are carried in the owning manifests and qualified overrides; unused protocol SDK dependencies MUST NOT remain in the runtime graph. The MCP handler uses the repository's own protocol implementation. A successful install alone does not close an advisory: inspect the resolved deployment graph and rerun the affected test, build, and security checks.

Appointment contracts MUST preserve existing minute-, second-, and fractional-second timestamps with explicit UTC offsets across validator updates. Verification: packages/core/test/appointmentDateTimeContract.test.ts checks create, both patch representations, response records, and rejection of invalid dates or missing offsets. Generated OpenAPI schemas MUST match the validators (npm run generate:openapi and npm run lint:openapi).

The Google Sheets picker MUST treat OAuth tokens and configuration as data in both the HTML script and callback URL contexts. Tokens containing quotes, script terminators, replacement-string syntax, or query delimiters MUST retain their exact value without creating executable markup or extra query parameters. Verification: tests/connectors/googleSheetsExtra.int.test.ts, including its actual-template script and callback regression cases.

The migration items below remain open until their own acceptance criteria pass. Plugin catalog and invocation traffic follows the environment-dependent network policy, including stored snapshots, DNS resolution and redirects. With Core's NODE_ENV=production, endpoints require public HTTPS addresses; all other values, including an unset variable, permit local HTTP and private-network destinations for development. Production deployments MUST explicitly set NODE_ENV=production; catalog visibility does not grant an exception in that environment. Verification: packages/core/test/lib/pluginHttp.test.ts, packages/core/test/handlers/plugin.test.ts, packages/core/test/handlers/log.test.ts, and packages/template/serverless-deploy/sample.env.yml. Scanner disposition still requires the current finding path and test evidence; a policy helper's presence alone does not close an alert.

Reviewer focus: preserve picker token round-tripping, inspect dependency API/Node-engine compatibility, and confirm that no major-version override replaces a required migration. Rollback MUST restore compatible manifests and the validated artifact/lock snapshot together; it MUST NOT remove the picker serialization regression coverage.

Required security outcome

  • Build and deployment tooling MUST NOT allow an archive to create or overwrite files outside its extraction target.
  • AWS regions used by deployment tooling MUST come from trusted, validated configuration.
  • Developer tunnel commands MUST NOT concatenate or execute untrusted arguments.
  • Resolved dependencies MUST NOT contain a vulnerable uuid implementation, even though the affected v3, v5, and v6 buffer call pattern is not currently observed in repository code.
  • Remediation MUST preserve packaging, deployment, SQLite-backed tests, and the port 6066 development-tunnel workflow.

Remaining work

1. Migrate Serverless Framework v3

serverless@3.40.0 owns the largest cluster in both affected lockfiles:

The candidate remediation is Serverless Framework v4 or a replacement deployment workflow. This is not a lockfile-only update: the official v4 guidance requires authentication, may require a commercial license, and calls for plugin, test-stage, and CI credential review. Version 3 is no longer maintained or receiving security updates.

Acceptance criteria:

  • Assign an owner and resolve Serverless v4 license/procurement and CI authentication requirements.
  • Validate serverless-deployment-bucket and serverless-plugin-log-retention compatibility.
  • Compare generated packages and CloudFormation output with the current workflow.
  • Deploy and remove a dedicated non-production stage, then exercise the health endpoint and representative connector flows.
  • Rescan every tracked lockfile and confirm the Serverless-owned advisory cluster is absent.

2. Replace the legacy ngrok package

The root and template manifests directly depend on ngrok@5.0.0-beta.2, which has a high-severity command-injection advisory and no patched release. The current npm run ngrok script starts a CLI tunnel for port 6066.

The maintained @ngrok/ngrok package is an SDK rather than a drop-in CLI replacement, so this change needs either a small, argument-safe wrapper or an explicitly managed standalone CLI workflow.

Acceptance criteria:

  • Preserve a documented one-command tunnel workflow for port 6066.
  • Read credentials from environment variables and never construct a shell command from user-controlled input.
  • Verify startup, public URL reporting, shutdown, and failure behavior on supported developer platforms.
  • Remove both legacy ngrok package instances and confirm the advisory is absent from both lockfiles.

3. Upgrade or replace the SQLite native toolchain

sqlite3@5.1.7 is used for local and test database support. Its install chain owns four tar@6.2.1 paths through sqlite3, node-gyp@8, and cacache. Those copies are affected by seven archive extraction advisories:

sqlite3@6.0.1 is a candidate short-term migration because it moves to Node 20.17 or newer, node-gyp@12, and tar@7. It is still a major native-module upgrade, and the upstream project is now archived, so the long-term maintained-driver decision remains NEEDS_REVIEW.

Acceptance criteria:

  • Confirm that all CI and supported developer environments satisfy the Node 20.17 minimum.
  • Run Sequelize migration and CRUD tests against sqlite::memory:.
  • Exercise both prebuilt-binary and forced-source installation on the supported OS and architecture matrix.
  • Confirm every resulting tar copy resolves to a patched version.
  • Decide whether sqlite3@6 is an interim step or whether the project should move to a maintained driver.

4. Converge transitive uuid versions through parent upgrades

uuid GHSA-w5hq-g745-h8pq affects v3, v5, and v6 when a caller supplies an output buffer. No tracked repository source imports the uuid package directly, and the vulnerable call pattern was not observed during this review; reachability is therefore not observed, not proven impossible.

Vulnerable copies are owned by unrelated parents: Serverless and AWS SDK v2, ngrok, Sequelize, and Google API libraries. A global major-version override would cross their declared compatibility ranges and is not a safe simple fix.

Acceptance criteria:

  • Remove or upgrade the owning parents through the Serverless, ngrok, Sequelize, Google API, and AWS SDK workstreams.
  • Add or retain identifier-generation behavior tests where an upgraded parent uses UUIDs.
  • Confirm that no vulnerable uuid version remains in any tracked lockfile.

Interim constraints

Until the migrations are complete:

  • Build, install, and deployment archives MUST come only from trusted project and package-registry sources.
  • Untrusted input MUST NOT be passed to the ngrok script, Serverless CLI options, or AWS region configuration.
  • These alerts MUST remain open; dismissal or risk acceptance requires an assigned owner and explicit security review.

Verification

Install the root workspace with npm ci and inspect the committed lock and npm ls --all --json output. Build the production artifact and inspect its post-install lock and production dependency output separately. The standalone UI uses its committed lock with npm ci. Historical advisory counts from earlier root/template snapshots MUST NOT be reported as current installation or deployment results.

For each future migration:

  1. Run npm ci in a clean root workspace with the supported Node version and registry; run npm ci in the standalone UI. Generated applications resolve and retain their own root locks.
  2. Run npm run typecheck, npm run typecheck:core, npm test, npm run test-coverage, npm run test:e2e, npm run lint:openapi, and npm run typecheck:contracts.
  3. Run the MCP UI build and tests.
  4. Scan the committed root and UI locks and the generated artifact lock, and read back the current Checkmarx and private Dependabot reports. Keep the scan inputs as build evidence.

Verification: Missing — authenticated readback of the private Dependabot alert page is still required after these migrations.

Reviewer focus

  • Serverless licensing, authentication-secret ownership, plugin compatibility, and package/deployment parity.
  • Whether any build or deployment archive can be influenced by an untrusted party.
  • Native SQLite installation on platforms that do not receive a prebuilt binary.
  • Developer tunnel credential handling and command construction.
  • Parent-package compatibility instead of forced tar or uuid major overrides.

Citations