chore(deps): upgrade project dependencies to latest versions#272
chore(deps): upgrade project dependencies to latest versions#272Sourav-kashyap wants to merge 3 commits intomasterfrom
Conversation
2778636 to
d7e0a8b
Compare
rohit-sourcefuse
left a comment
There was a problem hiding this comment.
Overall Review
What this PR does:
- Bumps all
dependenciesanddevDependenciesinpackage.jsonand regeneratespackage-lock.json - Upgrades core LoopBack packages (
@loopback/boot,@loopback/core,@loopback/rest,@loopback/context) to latest patch releases - Upgrades several major devDependency versions:
commitlintv17→v20,huskyv7→v9,jsdomv21→v29,nodemailerv6→v8,nycv17→v18,pubnubv8→v10,typescript~5.2.2→~5.7.3,@parse/node-apnv5→v8,@semantic-release/*toolchain - Adds three new
overridesentries:lodash,undici,picomatch(vulnerability remediation) - Updates the Trivy CI action reference from
@0.28.0to@master - Bumps
@types/nodefrom^16all the way to^25
Must-fix before merge
-
Trivy action pinned to
@master— This is a security regression. A mutable branch reference in a supply-chain-sensitive security scanner is unacceptable. Pin to a specific release tag or commit SHA (e.g.,aquasecurity/trivy-action@v0.30.0). See inline comment. -
lodashoverride version^4.18.0does not exist — The latest lodash v4 is4.17.21. There is no4.18.xpublished. This override is silently ineffective. Change to^4.17.21. See inline comment. -
aws-sdkv2 is EOL — AWS ended maintenance for SDK v2 on September 8, 2025. It will receive no further security patches. This PR bumps it to^2.1693.0but should migrate to the modular@aws-sdk/client-*v3 packages (which are already present as transitive deps). If migration is out of scope, open and link a tracked issue. See inline comment. -
twilionot upgraded — Still at^3.82.0while Twilio Node SDK v5.x is current. Twilio v3 is maintenance-only. Either upgrade or document the deferral with a follow-up issue. See inline comment. -
Husky v7→v9 migration completeness — The
.husky/hook files likely need to be updated to v9 format (no shebang, nohusky.shsource line). If those files were not updated in this PR, fresh contributor installs will encounter broken hooks. Please confirm and include the.husky/changes. See inline comment.
Nice-to-have follow-ups
-
@types/node@25.xvs LTS runtime — Using^25.5.0types when the minimum engine is Node 20 LTS can mask runtime availability issues. Consider aligning types to^20.19.0or^22.15.0. See inline comment. -
firebase-adminnot upgraded — Still at^12.1.1; current stable is v13.x. Inconsistent with the stated goal of upgrading all deps to latest. -
@parse/node-apnv5→v8 (3 majors) — Confirm test coverage exercises the APN send path with the new major version. Three major versions is a significant jump for a notification-critical library. -
@semantic-release/commit-analyzerv9→v13 — This is a significant jump in the release toolchain. Worth manually running a dry-run release to confirm the changelog and version-bump behaviour is as expected before merging. -
nodemailerv6→v8 — Major version bump in the email transport layer. Ensure the@types/nodemailerupgrade to^7covers the v8 API surface and that any nodemailer-specific test coverage is in place. -
Consider running
npm auditoutput as a CI artifact or adding it as a step to the workflow so future PRs make the security posture of the lock file explicit.
95d2eb6 to
a4cd121
Compare
| "@semantic-release/github": "^12.0.6", | ||
| "@semantic-release/npm": "^13.1.5", | ||
| "@semantic-release/release-notes-generator": "^10.0.3", | ||
| "@types/node": "^16.18.119", |
There was a problem hiding this comment.
@types/node is still ^16.18.119. The project targets Node 20+ and the @loopback/* packages have been bumped to v7/v8, which assume Node 20 globals. The ^16 types cause type inaccuracies and miss Node 20 additions.
"@types/node": "^20.19.0"Low-risk change — straightforward to include with this update pass.
There was a problem hiding this comment.
i'll update this in follow-up PR since it is a major version change.
.github/workflows/trivy.yaml
Outdated
|
|
||
| - name: Run Trivy vulnerability scanner in repo mode | ||
| uses: aquasecurity/trivy-action@0.28.0 | ||
| uses: aquasecurity/trivy-action@0.35.0 |
There was a problem hiding this comment.
trivy-action@0.35.0 is a mutable tag. The upstream maintainer can force-push this tag to a different commit at any time, silently changing what runs in your security scan — a known supply chain risk.
Pin to the commit SHA instead:
uses: aquasecurity/trivy-action@57a97c7e8b8c6e9c1a7a20db8c5e540c31cf79a8 # v0.35.0
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
There was a problem hiding this comment.
While using a version tag like @0.35.0 is common across projects, mutable tags can be force-pushed by upstream maintainers, which introduces a supply-chain risk — especially in a security-scanning workflow. Pinned to the immutable commit SHA in 7e4e51f:
uses: aquasecurity/trivy-action@57a97c7e8b8c6e9c1a7a20db8c5e540c31cf79a8 # v0.35.0This ensures the exact same code runs every time regardless of any upstream tag changes.
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
There was a problem hiding this comment.
Hi @Sourav-kashyap ,
Thanks for the response and for flagging that the same pattern is used across other projects — that's a fair observation and I appreciate you checking.
That said, I want to explain why I'm still flagging this even though it's consistent with other workflows.
The core issue with mutable tags like @0.35.0:
A version tag in GitHub Actions is not the same as a pinned version in package.json. Any repository owner can silently force-push a tag like 0.35.0 to point to a completely different commit — no changelog, no notification, no trace.
When your CI picks it up next time, it runs different code than it did yesterday.
This matters most in two places:
- Security scanning workflows — if the scanner itself is compromised, it can suppress findings or report clean results on malicious code
- Actions that have broad repository access — which trivy-action does by nature
The fix is simple — just add the commit SHA as a comment anchor:
uses: aquasecurity/trivy-action@57a97c7e8b8c6e9c1a7a20db8c5e540c31cf79a8 # v0.35.0
This still reads clearly as v0.35.0 but is now immutable — a force-push upstream has zero effect on your pipeline.
There was a problem hiding this comment.
Correction: the SHA 57a97c7e8b8c6e9c1a7a20db8c5e540c31cf79a8 I suggested earlier does not resolve — CI confirmed this with Unable to resolve action.
The correct commit SHA for v0.35.0 (verified via git ls-remote):
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0Apologies for the incorrect SHA in the earlier comment.
There was a problem hiding this comment.
@copilot revert your commit or correct it with right SHA :
uses: aquasecurity/trivy-action@57a97c7 # v0.35.0
There was a problem hiding this comment.
Corrected in c7af0ac — the SHA is now updated to the valid v0.35.0 commit:
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
rohit-sourcefuse
left a comment
There was a problem hiding this comment.
Summary
Good dependency hygiene pass overall — the @loopback/* bumps, TypeScript ~5.7.3 pin, and lodash/node-forge overrides are all correct. Two issues need to be resolved before this can merge, as they will break the release pipeline on the current Node 20 CI baseline.
Must fix before merge:
@semantic-release/github@12.0.6requires Node^22.14.0 || >= 24.10.0— CI runs Node 20 and will fail. Downgrade to^11.0.0.undicioverride^6.24.0conflicts with@semantic-release/github@12.0.6which requiresundici ^7.0.0. This will silently breaksemantic-releaseat runtime. Update the override to^7.0.0(or pair with the downgrade above).
Nice to have:
- Bump
@types/nodefrom^16.18.119to^20.19.0to match the actual Node 20 runtime. - Pin
trivy-actionto a commit SHA rather than the mutable@0.35.0tag to eliminate supply chain risk.
|
Thanks for the updates — resolved the threads that are addressed. Two blocking issues still need to be fixed before this can merge: 1. This version requires "@semantic-release/github": "^11.0.0"2.
"undici": "^7.0.0"These two issues are linked — the simplest fix is downgrading |
upgrade project dependencies to latest versions GH-271
…fety Agent-Logs-Url: https://github.com/sourcefuse/loopback4-notifications/sessions/7524a630-bf35-486e-a73e-1541c2fe1e82 Co-authored-by: rohit-sourcefuse <16935898+rohit-sourcefuse@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates Node/LoopBack tooling dependencies and the Trivy GitHub Actions workflow to newer versions as part of a repo-wide dependency refresh.
Changes:
- Bumped LoopBack framework/build/test dependencies and core tooling (TypeScript, eslint, simple-git, semantic-release plugins).
- Added additional
overridesentries to force certain transitive dependency versions. - Updated Trivy GitHub Action version and adjusted YAML quoting.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| package.json | Updates runtime/dev dependency versions and adds new overrides entries. |
| .github/workflows/trivy.yaml | Updates Trivy action version and refines workflow step configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@semantic-release/npm": "^13.1.5", | ||
| "@semantic-release/release-notes-generator": "^10.0.3", | ||
| "@types/node": "^16.18.119", | ||
| "@types/nodemailer": "^6.4.4", | ||
| "@types/proxyquire": "^1.3.28", | ||
| "@types/proxyquire": "^1.3.31", | ||
| "@types/pubnub": "^7.4.2", | ||
| "@types/socket.io-client": "^1.4.33", |
There was a problem hiding this comment.
The project declares Node >=20, but devDependencies still pin @types/node to ^16.18.119. With TypeScript upgraded to ~5.7.3, this can cause missing/incorrect Node API typings for development and CI builds. Consider bumping @types/node to a major that matches your supported Node range (e.g., 20/22) and ensure it stays consistent with the engines field and CI Node version.
| "lodash": "^4.17.21", | ||
| "undici": "^7.0.0", | ||
| "picomatch": "^4.0.4" |
There was a problem hiding this comment.
The new global overrides for undici (^7.0.0) and picomatch (^4.0.4) force major versions across the entire dependency tree, even where upstream packages declare older major ranges (the current lockfile includes transitive deps requesting undici ^5 and ^6). This bypasses semver constraints and can create hard-to-debug runtime issues. Prefer scoping overrides to specific packages/paths or upgrading the upstream packages so their declared ranges include these majors.
| "lodash": "^4.17.21", | |
| "undici": "^7.0.0", | |
| "picomatch": "^4.0.4" | |
| "lodash": "^4.17.21" |
.github/workflows/trivy.yaml
Outdated
| @@ -22,8 +22,8 @@ jobs: | |||
| - uses: actions/checkout@v3 | |||
There was a problem hiding this comment.
This workflow still uses actions/checkout@v3. Since GitHub Actions has moved off the Node 16 runtime, v3-based JS actions can become unsupported/break; please upgrade to actions/checkout@v4 to keep the workflow compatible long-term.
| - uses: actions/checkout@v3 | |
| - uses: actions/checkout@v4 |
| "@semantic-release/git": "^10.0.1", | ||
| "@semantic-release/github": "^12.0.0", | ||
| "@semantic-release/npm": "^13.1.1", | ||
| "@semantic-release/github": "^11.0.0", |
| "@semantic-release/npm": "^13.1.5", | ||
| "@semantic-release/release-notes-generator": "^10.0.3", | ||
| "@types/node": "^16.18.119", | ||
| "@types/nodemailer": "^6.4.4", | ||
| "@types/proxyquire": "^1.3.28", | ||
| "@types/proxyquire": "^1.3.31", | ||
| "@types/pubnub": "^7.4.2", | ||
| "@types/socket.io-client": "^1.4.33", |
Agent-Logs-Url: https://github.com/sourcefuse/loopback4-notifications/sessions/e04a6e1d-b349-40c1-aa8f-15cd0f16fb4b Co-authored-by: rohit-sourcefuse <16935898+rohit-sourcefuse@users.noreply.github.com>
SonarQube reviewer guide
|





Description
This issue tracks upgrading all project dependencies to their latest stable versions.
Changes
dependenciesanddevDependenciesto latest versionsChecklist:
Tested