fix(deps): resolve Dependabot security alerts - #133
Conversation
Bump the @angular 21 runtime and build tooling to the latest in-major 21.2.x patch releases and regenerate package-lock.json so the patched build-chain transitives are pulled in. - @angular/{animations,common,compiler,core,forms,platform-browser, platform-browser-dynamic,router,compiler-cli,language-service}: 21.2.12 -> 21.2.18 - @angular-devkit/build-angular, @angular/cli, @angular/build: 21.2.11 -> 21.2.19 (bundles patched esbuild/vite/undici/piscina/ http-proxy-middleware/webpack-dev-server) This clears the @angular/{core,common,compiler} advisories plus the transitive build-tooling vulns (vite, esbuild, webpack-dev-server, http-proxy-middleware, piscina, ws, tmp, undici, sigstore, hono, shell-quote, qs, js-yaml, tar, @babel/core, launch-editor). npm audit: 35 (1 critical / 17 high / 15 moderate / 2 low) -> 6 (0 critical / 0 high / 5 moderate / 1 low) Remaining 6 are dev-only deep transitives with no clean upstream fix: nested esbuild under ng-packagr (ng-packagr pins esbuild@^0.27.0) and uuid via sockjs -> webpack-dev-server (npm reports "No fix available"). Verified: npm run build:lib (ng-packagr production library build) passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates Angular v21 dependencies to patched 21.2.x releases to address Dependabot security alerts, along with a regenerated lockfile to pull in patched transitive tooling versions.
Changes:
- Bumps
@angular/*runtime packages to21.2.18. - Bumps Angular build tooling (
@angular-devkit/build-angular,@angular/cli) to21.2.19. - Regenerates
package-lock.jsonto resolve patched transitive dependencies.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Updates Angular runtime + build tool version ranges to patched v21.2.x releases. |
| package-lock.json | Regenerated lockfile to realize the updated Angular/tooling versions and patched transitives. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@angular/animations": "^21.2.18", | ||
| "@angular/common": "^21.2.18", | ||
| "@angular/compiler": "^21.2.18", | ||
| "@angular/core": "^21.2.18", | ||
| "@angular/forms": "^21.2.18", | ||
| "@angular/platform-browser": "^21.2.18", | ||
| "@angular/platform-browser-dynamic": "^21.2.18", | ||
| "@angular/router": "^21.2.18", |
There was a problem hiding this comment.
Declined — keeping the caret ranges.
- These caret ranges are pre-existing; this PR only raises the version floor (
^21.2.3→^21.2.18) and never touched the range operator. Switching just these lines to~would make them inconsistent with the rest ofpackage.json, where every other@angular/*entry (and most devDeps) uses^. - Caret is Angular's own convention (
ng new/ng updategenerate^ranges), so~would fight the framework tooling. package-lock.jsonpins the exact patched versions and CI runsnpm ci, so21.2.18is installed regardless of the operator — the security remediation is fully realized. The caret only permits a bump on a deliberatenpm update/lockfile regen.- The PR's stated intent is in-major (no v21→v22 jump), which
^21.2.xalready honors. This is also the privatemy-angular-crasherdemo app's manifest, not the publishedbugsplat-nglibrary, so the range never reaches consumers.
| "@angular-devkit/build-angular": "^21.2.19", | ||
| "@angular-eslint/builder": "21.3.0", | ||
| "@angular-eslint/eslint-plugin": "21.3.0", | ||
| "@angular-eslint/eslint-plugin-template": "21.3.0", | ||
| "@angular-eslint/schematics": "21.3.0", |
There was a problem hiding this comment.
Declined — same rationale as the runtime deps thread.
@angular-devkit/build-angular and @angular/cli already used caret before this PR; only the floor moved (^21.2.2 → ^21.2.19). package-lock.json pins the exact 21.2.19 and CI installs via npm ci, so the patched build chain is what actually resolves regardless of ^ vs ~. Keeping ^ stays consistent with Angular's tooling conventions and the rest of the manifest. The "in-major" intent (no v21→v22 upgrade) is already satisfied by the caret.
Clears the remaining low-severity esbuild advisory (GHSA-g7r4-m6w7-qqqr) by forcing ng-packagr's nested esbuild to ^0.28.1 via npm overrides. Library build (ng-packagr) verified. npm audit: 6 -> 5 (only the dev-only uuid<-sockjs<-webpack-dev-server chain remains, which has no upstream fix). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Resolves the open Dependabot security alerts by bumping the Angular 21 runtime and build tooling to the latest in-major
21.2.xpatch releases and regeneratingpackage-lock.jsonso the patched build-chain transitives are pulled in.All changes stay within Angular v21 (no major/framework upgrade) and the production library build is verified passing.
Files changed
package.json— raised the version floors for the@angular/*runtime + build tooling to their patched21.2.xreleases (12 lines).package-lock.json— regenerated to resolve the whole stack to latest21.2.xand pull patched transitives.Version bumps
@angular/{animations,common,compiler,core,forms,platform-browser,platform-browser-dynamic,router,compiler-cli,language-service}v21-lts)@angular-devkit/build-angular,@angular/cli,@angular/buildThe
@angular/build21.2.19 bump is what clears the deep build-tooling transitives:vite7.3.6,esbuild0.28.1,undici7.28.0,piscina5.2.0,http-proxy-middleware3.0.7,webpack-dev-server5.2.5. The lockfile regen also picked up patchedws,tmp,shell-quote,qs,js-yaml,tar,hono,sigstore,@babel/core, andlaunch-editor.npm audit: before → after
The
@angular/{core,common,compiler}advisories are patched in-major (21.2.12 → 21.2.18), so this is a low-risk minor/patch bump.Remaining alerts (6) and why
Both are dev-only, deeply nested transitives with no clean upstream fix, and neither is exploitable in this library's build/publish workflow:
esbuild(GHSA-g7r4-m6w7-qqqr, low) — nestedesbuild@0.27.7underng-packagr, which pinsesbuild@^0.27.0. The top-level@angular/buildtree already uses the patchedesbuild@0.28.1. The advisory only affects esbuild's dev server on Windows;ng-packagris a library bundler and never runs it. Forcing it via an override risks breaking the very tool that builds the library.uuid< 11.1.1 (GHSA-w5hq-g745-h8pq, moderate) — pulled bysockjs→webpack-dev-server(dev server only, never used inbuild:libor production).npm auditreports "No fix available" sincesockjshas no release onuuid@11. The 4 additional moderate entries (sockjs,webpack-dev-server,@angular-devkit/build-angular,@angular-devkit/build-webpack) are transitive reflections of this sameuuidissue.Verification
npm install(fresh lockfile) — clean, 1654 packages.npm run build:lib(ng build bugsplat-ng --configuration=production, ng-packagr) — passes, Angular package built + assets copied.npm run lint— the 6 reported errors (@angular-eslint/prefer-inject,no-output-native) are pre-existing onmainin source files untouched by this PR;@angular-eslintis pinned at21.3.0and unchanged. Not a regression.🤖 Generated with Claude Code