Fix Dependabot security alerts across JavaScript samples - #365
Merged
Conversation
Resolve all open Dependabot vulnerability alerts across four JavaScript sample projects (npm audit now reports 0 vulnerabilities in each): - EventGridIntegration/javascript: migrate from the deprecated azure-storage package (which depends on the unpatchable `request` SSRF, GHSA-p8p7-x288-28g6) to @azure/data-tables. Rewrites the OnConnection table logic; behavior and the optimistic-concurrency retry loop are preserved. - QuickStartServerless/javascript/v4-programming-model: drop the azurite devDependency (a local-only emulator that pulls a large, perpetually vulnerable transitive tree) and run it on demand via npx; bump azure-functions-core-tools to ^4.12.0. - ServerlessChatWithAuth/v4-model: bump azure-functions-core-tools to ^4.12.0 (older builds shipped vulnerable minimatch/debug/brace-expansion). - Whiteboard/MCPServer: refresh lockfile (npm audit fix), bumping @modelcontextprotocol/sdk, hono, fast-uri, qs and ws to patched versions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vicancy
enabled auto-merge (squash)
June 16, 2026 01:34
zackliu
approved these changes
Jun 16, 2026
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
Resolves all 45 open Dependabot vulnerability alerts (1 critical, 14 high, 27 moderate, 3 low) across the four JavaScript sample projects. After these changes,
npm auditreports 0 vulnerabilities in every affected project.The alerts were all in transitive dependencies, so each project needed a different, targeted approach rather than a simple version bump.
Changes per project
samples/EventGridIntegration/javascriptMigrated from the deprecated
azure-storagepackage to@azure/data-tables.azure-storagedepends on the deprecatedrequestpackage, whose SSRF advisory (GHSA-p8p7-x288-28g6) has no patched version — so the only way to clear it (and the relatedform-data,qs,tough-cookie,uuid,xml2jsalerts) was to stop usingazure-storage.OnConnection/index.jswas rewritten to use@azure/data-tables:createTableIfNotExists→createTable()(idempotent, cached per process)retrieveEntity/insertEntity/replaceEntity→getEntity/createEntity/updateEntityetagtoupdateEntity(..., 'Replace', { etag }).The
AZURE_STORAGE_CONNECTION_STRINGsetting is unchanged, so no configuration changes are required.samples/QuickStartServerless/javascript/v4-programming-modelazuritedevDependency. Azurite is a local-only storage emulator that drags in a large, perpetually-vulnerable transitive tree (axios,uuid,@azure/identity,tough-cookie,xml2js,tedious,applicationinsights, …) at every published version. The sample's runtime code never imports it.start:azuritescript now runs it on demand vianpx --yes azurite …, preserving the one-command workflow without committing the vulnerable tree to the lockfile (matches how the sibling C# samples document Azurite). README updated accordingly.azure-functions-core-toolsto^4.12.0.samples/ServerlessChatWithAuth/v4-modelBumped
azure-functions-core-toolsto^4.12.0. Older builds bundled vulnerableminimatch,debug, andbrace-expansion(which can't be fixed viaoverridesbecause they ship inside the package tarball); 4.12.0 uses caret-ranged, patched dependencies.samples/Whiteboard/MCPServerRefreshed the lockfile via
npm audit fix, bumping@modelcontextprotocol/sdk(→ 1.29.0),hono,fast-uri,qs, andwsto patched versions.Verification
npm audit→ 0 vulnerabilities in all four projects.node --checkpasses for the modifiedEventGridIntegrationfunction files.OnConnectionmodule loads and parses a connection string cleanly.