[auto-sec] Consolidate aspire-samples dependency security remediations - #1782
Conversation
There was a problem hiding this comment.
Pull request overview
This PR consolidates multiple dependency security remediations across the aspire-samples repo by updating pinned/locked dependency versions and introducing npm overrides to enforce patched minima in affected sample apps.
Changes:
- Add
overridesto multiple samplepackage.jsonfiles to force patched versions ofesbuildand@babel/core, plus additional overrides in the Angular sample. - Update multiple
package-lock.jsonfiles to reflect the remediated dependency graph. - Update Python
uv.lockto bumpstarletteto a patched version (transitive via FastAPI).
Reviewed changes
Copilot reviewed 9 out of 19 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| samples/vite-yarp-static/package.json | Adds overrides to pin esbuild to a patched version. |
| samples/vite-yarp-static/package-lock.json | Updates lockfile to reflect patched esbuild resolution. |
| samples/vite-react-fastapi/package.json | Adds overrides to pin esbuild to a patched version. |
| samples/vite-react-fastapi/package-lock.json | Updates lockfile to reflect patched esbuild resolution. |
| samples/rag-document-qa-svelte/api/uv.lock | Updates locked Python dependency graph (notably starlette). |
| samples/python-openai-agent/package.json | Adds overrides to pin esbuild to a patched version. |
| samples/python-openai-agent/package-lock.json | Updates lockfile to reflect patched esbuild resolution. |
| samples/python-fastapi-postgres/package.json | Adds overrides to pin esbuild to a patched version. |
| samples/python-fastapi-postgres/package-lock.json | Updates lockfile to reflect patched esbuild resolution. |
| samples/polyglot-task-queue/package.json | Adds overrides to pin esbuild to a patched version. |
| samples/polyglot-task-queue/package-lock.json | Updates lockfile to reflect patched esbuild resolution. |
| samples/node-express-redis/package.json | Adds overrides to pin esbuild to a patched version. |
| samples/node-express-redis/package-lock.json | Updates lockfile to reflect patched esbuild resolution. |
| samples/aspire-with-python/frontend/package.json | Adds overrides to pin @babel/core to a patched version. |
| samples/aspire-with-python/frontend/package-lock.json | Updates lockfile to reflect patched @babel/* resolution. |
| samples/aspire-with-javascript/AspireJavaScript.Vite/package.json | Adds overrides to pin @babel/core to a patched version. |
| samples/aspire-with-javascript/AspireJavaScript.Vite/package-lock.json | Updates lockfile to reflect patched @babel/* resolution. |
| samples/aspire-with-javascript/AspireJavaScript.Angular/package.json | Bumps @angular/core and adds multiple security-related overrides. |
| samples/aspire-with-javascript/AspireJavaScript.Angular/package-lock.json | Updates Angular lockfile to reflect remediations and dependency graph changes. |
Files not reviewed (9)
- samples/aspire-with-javascript/AspireJavaScript.Angular/package-lock.json: Generated file
- samples/aspire-with-javascript/AspireJavaScript.Vite/package-lock.json: Generated file
- samples/aspire-with-python/frontend/package-lock.json: Generated file
- samples/node-express-redis/package-lock.json: Generated file
- samples/polyglot-task-queue/package-lock.json: Generated file
- samples/python-fastapi-postgres/package-lock.json: Generated file
- samples/python-openai-agent/package-lock.json: Generated file
- samples/vite-react-fastapi/package-lock.json: Generated file
- samples/vite-yarp-static/package-lock.json: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Responding to the automated Copilot reviewer comments about registry drift (all 9 are the same concern): The lockfiles in this PR resolve packages from the Evidence: all 3 CI jobs (Build & Test Samples ubuntu, Build & Test Samples windows, license/cla) pass cleanly, confirming the feed is accessible and packages resolve correctly. If contributors outside the Microsoft network need to install dependencies locally, they should configure their npm registry to point at |
b0e90c8 to
470ea88
Compare
|
The build failures on both ubuntu and windows are pre-existing C# package vulnerabilities, not caused by this PR:
This PR's scope: npm (JavaScript/TypeScript) and Python (Starlette) security fixes. The C# package vulnerabilities exist on npm/Python changes are verified:
Next: A separate PR should consolidate the C# vulnerabilities (MessagePack, Microsoft.OpenApi, etc.). This PR should merge once the C# blocker is lifted or independently gated. |
07b09a7 to
6300905
Compare
6300905 to
ba632d5
Compare
ba632d5 to
f9e551c
Compare
a8ef49b to
80ce692
Compare
Review feedback addressed (2026-07-29)Copilot reviewer: lockfile registry URLs (9 threads)The lockfiles were regenerated using the Microsoft internal npm proxy (ms-feed-*.pkgs.visualstudio.com), which produced non-standard resolved URLs and sha1 integrity hashes instead of Fixed in commit fc0c1eb:
Damian Edwards (@DamianEdwards): Directory.Build.props (2 threads)The central PackageVersion approach was reverted in commit e6ddef5 — no .props, .targets, or .csproj files are changed in the current diff. Replied to both threads to clarify. |
|
Fixed the ubuntu npm ERESOLVE in the Angular sample by aligning samples/aspire-with-javascript/AspireJavaScript.Angular/package.json back to ypescript@~6.0.3, which matches @angular-devkit/build-angular@22.0.9's supported peer range. This should unblock Build & Test Samples (ubuntu-latest). |
|
Fixed the Angular CI failure by aligning samples/aspire-with-javascript/AspireJavaScript.Angular/package.json back to the versions already committed in the lockfile ( ypescript@~6.0.3 and the matching Angular 22.0.7/22.0.5 ranges). The ubuntu npm ERESOLVE came from manifest/lockfile drift, not from the security remediation itself. |
|
Follow-up fix pushed in c2a7d1b: Angular package.json and package-lock.json are now realigned so the AppHost �ngular-installer |
4b3e3c7 to
a13d63b
Compare
CI status — pre-existing
|
84280d2 to
1d7855c
Compare
✅ CI now green — ready for reviewRun The final blocker — the Angular Only remaining gate is an external approving review (self-approval isn't permitted). Not enabling auto-merge. |
84bf000 to
62c0e8a
Compare
Clears all 86 open Dependabot alerts (79 npm, 4 pip, 3 go) across the sample projects using lockfile refreshes plus targeted, same-major package overrides. No application source changes. npm (23 lockfiles): npm audit fix --package-lock-only where safe; targeted overrides for residual advisories (fast-uri 3.1.6, postcss 8.5.23, brace-expansion 1.1.18, hono 4.13.5, webpack-dev-server 5.2.6, browserslist 4.28.7, js-yaml 4.3.2, nanoid 3.3.18, baseline-browser-mapping 2.11.0, postcss-selector-parser 7.1.3). 22/23 dirs now report 0 npm-audit vulnerabilities; Angular retains only non-Dependabot toolchain findings that require major Angular framework upgrades (tracked separately). go (samples/container-build/ginapp): google.golang.org/grpc v1.82.1 -> v1.83.1 (go mod tidy pulled otel core 1.43->1.44). go build ./... passes. pip (samples/rag-document-qa-svelte/api): starlette 1.0.1 -> 1.6.0 via uv lock. Verification: static check of every alert's installed version against its first-patched version confirms 86/86 cleared. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
62c0e8a to
1bf0aed
Compare
[auto-sec] aspire-samples dependency security consolidation
Canonical automated-security remediation PR for microsoft/aspire-samples. Converges every open Dependabot alert in this repo into a single mergeable change set. No application source changes — only lockfiles plus minimal, same-major package
overrides.Alerts addressed
Clears all 86 open Dependabot alerts (41 high / 36 moderate / 9 low):
npm audit fix --package-lock-onlyacross 23 lockfiles + targetedoverridesfor residual advisoriesuv lockbump of starlettego getbump of grpcAlerted packages covered:
@babel/core,@humanfs/node,baseline-browser-mapping,body-parser,brace-expansion,browserslist,esbuild,fast-uri,google.golang.org/grpc,hono,js-yaml,nanoid,postcss,postcss-selector-parser,protobufjs,qs,starlette,webpack-dev-server.Versions changed (key)
fast-uri3.1.6,postcss8.5.23,brace-expansion1.1.18,hono4.13.5,webpack-dev-server5.2.6,browserslist4.28.7,js-yaml4.3.2,nanoid3.3.18,baseline-browser-mapping2.11.0,postcss-selector-parser7.1.3 (applied only in the manifests that carry the corresponding alert).samples/container-build/ginapp):google.golang.org/grpc1.82.1 → 1.83.1 (go mod tidypulled otel core 1.43 → 1.44).go build ./...passes.samples/rag-document-qa-svelte/api):starlette1.0.1 → 1.6.0.Verification
npm auditafter changes: 22 of 23 npm project dirs report 0 vulnerabilities.AspireJavaScript.Angularretains 6 findings that are npm-audit-only, not Dependabot alerts (@angular-devkit/build-angular,body-parser,express,image-size,less,qsvia the dev/build toolchain) and require a major Angular framework upgrade; deferred and out of scope for this low-risk security batch.go build ./...passes;uv lockresolves (38 packages).Superseded / tracked Dependabot PRs
Consolidated here; each will be closed once this canonical PR is green and merged (closure gate):
#1904, #1905, #1914, #1917, #1918, #1919, #1920, #1921, #1922, #1924, #1925, #1928, #1937, #1938, #1939, #1940, #1941
Out of scope (NuGet / non-alert version bumps, left to normal flow): #1908, #1909, #1910, #1911, #1916.
Idempotency
dapire/security-deps/aspire-samples-lowrisk-batch(reset onto latestmain).automated-security. Title prefix:[auto-sec].