Skip to content

fix: remediate vulnerable dependencies with regression coverage - #304

Merged
sfreeman422 merged 3 commits into
masterfrom
security/dependency-remediation-2026-10-24
Oct 25, 2026
Merged

sfreeman422 merged 3 commits into
masterfrom
security/dependency-remediation-2026-10-24

Conversation

@sfreeman422

Copy link
Copy Markdown
Collaborator

Summary

  • Remediate runtime and development dependency advisories: full npm audit 29 → 0, production-only audit 20 → 0.
  • Update HTTP middleware, Axios, Protobuf, TypeORM, Moment, rate limiting, test/build tooling, and vulnerable transitives.
  • Migrate UUID to patched CommonJS-compatible v11 with bundled types; retain Express 4 and Tailwind 3.
  • Scope selector-parser overrides to Tailwind/postcss-nested, with pre/post-upgrade CSS regression coverage.
  • Add regressions for real UUID image paths, HTTP parsing/raw-body compatibility, proxy-aware rate limiting, Axios responses/redirects, and disposable database persistence.

Verification

  • Clean lockfile installs using Node 24.22.1.
  • 740 backend + 117 frontend tests passed; both coverage gates passed.
  • Builds, production backend compilation, lint, formatting, dependency-tree validation, and full/production npm audits passed.
  • Production frontend CSS/JS hashes match the pre-upgrade baseline.
  • Real MySQL-driver compatibility against disposable MariaDB passed for old/new TypeORM and production-only dependencies; all 21 entity schemas unchanged. No schema migration required.

Limits

  • Docker unavailable; container images/deployed services not verified.
  • External providers were not contacted; HTTP integrations used local servers.
  • Database test used MariaDB through the application's MySQL driver, not Oracle MySQL.

Upgrade affected runtime and development packages, retain CommonJS UUID support, and add HTTP, UUID, CSS, and disposable database regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings October 25, 2026 00:18
Archive every node_modules directory so nested workspace test dependencies survive restoration. Trigger both package checks when shared CI configuration changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Three unresolved moderate issues affect test isolation, proxy-aware rate limiting verification, and disposable database cleanup.

1 open issue
What changed in this PR

This pull request remediates vulnerable runtime and development dependencies while adding regression coverage for HTTP middleware, UUID image generation, Tailwind/PostCSS processing, and MySQL/MariaDB compatibility.

Changes:

  • Upgrades backend, frontend, testing, build, and transitive dependencies to eliminate reported audit vulnerabilities.
  • Adds regression tests for HTTP behavior, UUID image paths, Tailwind selectors, and disposable database persistence.
  • Adds scoped selector-parser overrides and documents optional database compatibility testing.
File Summary
README.md Documents dependency decisions and the optional disposable database compatibility test.
packages/​frontend/​tests/​styles.spec.ts Adds Tailwind selector, variant, nested-component, and responsive-output coverage.
packages/​frontend/​package.json Updates frontend build, CSS, testing, and coverage dependencies.
packages/​backend/​test/​db-compatibility.test.cjs Exercises real MySQL-compatible persistence, relations, transactions, and cleanup. Moderate issue: cleanup may be skipped if the application connection close fails (1 vote).
packages/​backend/​src/​shared/​middleware/​http-dependencies.spec.ts Covers body parsing, raw bodies, rate limiting, redirects, and Axios behavior. Moderate issue: the fixture enables trusted proxy handling, but the production app does not configure it, so proxy-aware rate limiting is not verified (3 votes).
packages/​backend/​src/​ai/​ai.service.spec.ts Adds UUID image filename, byte-preservation, and public-URL coverage. Moderate issue: filesystem spies are not restored, potentially causing the following test to use no-op implementations (1 vote).
packages/​backend/​package.json Updates backend dependencies and adds the database compatibility test command.
package.json Adds scoped postcss-selector-parser overrides for Tailwind and postcss-nested.
package-lock.json Records the upgraded dependency graph and patched transitive packages.

Review effort: Lite

@sfreeman422

Copy link
Copy Markdown
Collaborator Author

Fixed the CI failures in fe2b037: the shared dependency artifact archived only root node_modules and omitted workspace-local Vitest dependencies. The archive now includes every node_modules directory, and shared CI changes trigger both package pipelines. Reproduced artifact restoration in a fresh directory; backend build, both coverage gates, and frontend build passed. The updated GitHub Actions CI run 40146452566 is green.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Three moderate issues remain unresolved in test isolation, production proxy configuration, and disposable-database cleanup.

1 open issue

Review effort: Lite

@sfreeman422
sfreeman422 merged commit 538eb5e into master Oct 25, 2026
10 checks passed
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.

3 participants