fix(deps): resolve 35 npm audit vulnerabilities reported in #40#43
Open
Topmatrixmor2014 wants to merge 1 commit into
Open
fix(deps): resolve 35 npm audit vulnerabilities reported in #40#43Topmatrixmor2014 wants to merge 1 commit into
Topmatrixmor2014 wants to merge 1 commit into
Conversation
…Labs#40 Removes all moderate-or-higher production-dependency advisories reported by `npm audit --omit=dev` so the new CI audit gate stays green. Direct upgrades: - @sentry/node: ^9.47.1 -> ^10.59.0 (transitive @opentelemetry refresh; only stable APIs Sentry.init / setContext / withScope / captureException / captureMessage are used) - nodemailer: ^9.0.0 -> ^9.0.1 (patch, fixes message-level raw option bypass) Transitive overrides (npm overrides): - form-data ^4.0.4 (CRLF injection in multipart field names) - js-yaml ^4.1.1 (merge-key DoS) - multer ~1.4.5-lts.2 (1.x LTS line; 2.x is incompatible with @nestjs/platform-express; tilde allows future 1.4.5-lts.x backports) - uuid ^11.1.1 (missing buffer bounds check in v3/v5/v6) - ws ^8.18.0 (memory-exhaustion DoS from tiny fragments) CI hardening: - .github/workflows/ci.yml: new `audit` job runs `npm audit --omit=dev --audit-level=moderate` and fails any PR that re-introduces a moderate+ prod-dep advisory (guards against the regression that created OrbitChainLabs#40). - .github/dependabot.yml: weekly npm version updates grouped into production-security / production-major / production-minor-patch / dev-dependencies, so reviewers see small, focused bumps and security patches never pile up unnoticed. Verification (local): - npm audit --omit=dev --audit-level=moderate -> 0 vulnerabilities - npm run build -> passes - npm run lint -> 0 errors (260 warnings pre-existing on main, not introduced) - prettier --check src test -> matches - npm test -> 7 suites / 44 tests all pass Refs: OrbitChainLabs#40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #40.
npm audit --omit=devwas failing with 35 production-dependency advisories(19 moderate, 16 high) on
main. This branch fixes every moderate-or-higherprod-dep advisory and adds a CI gate so it cannot regress.
Changes
Direct upgrades (
package.json)@sentry/node:^9.47.1->^10.59.0(major; transitive @opentelemetryrefresh; the codebase only uses the stable surface —
Sentry.init,setContext,withScope,setExtras,captureException,captureMessage).nodemailer:^9.0.0->^9.0.1(patch; fixes message-levelrawoption bypass).
Transitive override pins (
package.json->overrides)form-data: ^4.0.4— CRLF injection in multipart field names/filenames.js-yaml: ^4.1.1— quadratic-complexity DoS via merge key handling.multer: ~1.4.5-lts.2— patched 1.x LTS branch. Multer 2.x is a breakingchange incompatible with
@nestjs/platform-express; the tilde allows anyfuture
1.4.5-lts.xsecurity backport without crossing to 2.x.uuid: ^11.1.1— missing buffer bounds check inv3/v5/v6.ws: ^8.18.0— memory-exhaustion DoS from tiny fragments/data chunks.CI hardening
.github/workflows/ci.yml: newauditjob runsnpm audit --omit=dev --audit-level=moderateand fails any PR thatre-introduces a moderate+ prod-dep advisory.
.github/dependabot.yml: weekly npm version updates grouped intoproduction-security/production-major/production-minor-patch/dev-dependencies. Security-relevant transitive bumps (form-data,js-yaml, multer, uuid, ws, @sentry/*, nodemailer) all stay in one
reviewable PR so the audit gate catches regressions early.
Verification
Local (commands the new CI audit job will run):
package-lock.jsonhas been regenerated to match.Note on the
test-e2ejobThe
test-e2eCI job inci.ymlwill continue to fail onmain(and onthis branch) —
PrismaService.onModuleInit()calls$connect()and therunner has no PostgreSQL / Redis service. This is pre-existing and
unrelated to #40. A proper fix (mock
PrismaServicein the e2e spec,or add real service containers to the
test-e2ejob) belongs in afollow-up PR so #40 stays scoped to the audit regression.
Refs #40
closes #40