Skip to content

A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.

Fix Dependabot security vulnerabilities (#741)

Priyanshu Agrawal03c963f6a9fa
diff --git a/plugins/pcf/lock/standard/package-lock.json b/plugins/pcf/lock/standard/package-lock.json
index cb7742fda..e961028ee 100644
--- a/plugins/pcf/lock/standard/package-lock.json
+++ b/plugins/pcf/lock/standard/package-lock.json
@@ -2183,15 +2183,6 @@
"node": ">=8"
}
},
- "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": {
- "version": "1.0.10",
- "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "sprintf-js": "~1.0.2"
- }
- },
"node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": {
"version": "4.1.0",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
@@ -4091,8 +4082,7 @@
"version": "2.0.1",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true,
- "license": "Python-2.0",
- "peer": true
+ "license": "Python-2.0"
},
"node_modules/async": {
"version": "2.6.4",
@@ -9321,12 +9311,6 @@
"source-map": "^0.6.0"
}
},
- "node_modules/sprintf-js": {
- "version": "1.0.3",
- "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
- "dev": true,
- "license": "BSD-3-Clause"
- },
"node_modules/stack-chain": {
"version": "1.3.7",
"integrity": "sha512-D8cWtWVdIe/jBA7v5p5Hwl5yOSOrmZPWDPe2KxQ5UAGD+nxbxU0lKXA4h85Ta6+qgdKVL3vUxsbIZjc1kBG7ug==",
diff --git a/plugins/pcf/lock/standard/package.json b/plugins/pcf/lock/standard/package.json
index 42c8b57fd..4ff1cd8f1 100644
--- a/plugins/pcf/lock/standard/package.json
+++ b/plugins/pcf/lock/standard/package.json
@@ -30,5 +30,9 @@
"ts-jest": "29.4.12",
"typescript": "5.9.3",
"typescript-eslint": "8.44.0"
+ },
+ "overrides": {
+ "argparse": "2.0.1",
+ "source-map-js": "1.2.2"
}
}
diff --git a/plugins/pcf/lock/virtual/package-lock.json b/plugins/pcf/lock/virtual/package-lock.json
index b5528d627..82804bcd2 100644
--- a/plugins/pcf/lock/virtual/package-lock.json
+++ b/plugins/pcf/lock/virtual/package-lock.json
@@ -3696,15 +3696,6 @@
"node": ">=8"
}
},
- "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": {
- "version": "1.0.10",
- "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "sprintf-js": "~1.0.2"
- }
- },
"node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": {
"version": "4.1.0",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
@@ -5631,8 +5622,7 @@
"version": "2.0.1",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true,
- "license": "Python-2.0",
- "peer": true
+ "license": "Python-2.0"
},
"node_modules/array-buffer-byte-length": {
"version": "1.0.2",
@@ -12308,8 +12298,8 @@
}
},
"node_modules/source-map-js": {
- "version": "1.2.1",
- "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
+ "version": "1.2.2",
+ "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
@@ -12326,12 +12316,6 @@
"source-map": "^0.6.0"
}
},
- "node_modules/sprintf-js": {
- "version": "1.0.3",
- "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
- "dev": true,
- "license": "BSD-3-Clause"
- },
"node_modules/stack-chain": {
"version": "1.3.7",
"integrity": "sha512-D8cWtWVdIe/jBA7v5p5Hwl5yOSOrmZPWDPe2KxQ5UAGD+nxbxU0lKXA4h85Ta6+qgdKVL3vUxsbIZjc1kBG7ug==",
diff --git a/plugins/pcf/lock/virtual/package.json b/plugins/pcf/lock/virtual/package.json
index 1aff139b3..3bc87cd25 100644
--- a/plugins/pcf/lock/virtual/package.json
+++ b/plugins/pcf/lock/virtual/package.json
@@ -38,5 +38,9 @@
"ts-jest": "29.4.12",
"typescript": "5.9.3",
"typescript-eslint": "8.44.0"
+ },
+ "overrides": {
+ "argparse": "2.0.1",
+ "source-map-js": "1.2.2"
}
}
diff --git a/plugins/process-intelligence/package-lock.json b/plugins/process-intelligence/package-lock.json
index 260ad4633..2c122b7d2 100644
--- a/plugins/process-intelligence/package-lock.json
+++ b/plugins/process-intelligence/package-lock.json
@@ -9,7 +9,7 @@
"version": "0.7.0",
"license": "MIT",
"dependencies": {
- "@modelcontextprotocol/sdk": "1.30.0",
+ "@modelcontextprotocol/sdk": "1.31.0",
"zod": "4.6.5"
},
"devDependencies": {
@@ -447,8 +447,8 @@
}
},
"node_modules/@modelcontextprotocol/sdk": {
- "version": "1.30.0",
- "integrity": "sha1-36ikg0fsLSwNR5F9fcV/dU439f8=",
+ "version": "1.31.0",
+ "integrity": "sha512-UvTMgnNlnIBO/22ob2RcVGDlcvOslQs8T59+FTGdA0L27a39fdGF/EDETNtDVK4DZGpwomlsYpRdA8UXcVL/pw==",
"license": "MIT",
"dependencies": {
"@hono/node-server": "^1.19.9 || ^2.0.5",
@@ -817,7 +817,6 @@
"version": "5.2.1",
"integrity": "sha1-jyHRW20yf5K0eU7PjLCKcvlWrAQ=",
"license": "MIT",
- "peer": true,
"dependencies": {
"accepts": "^2.0.0",
"body-parser": "^2.2.1",
@@ -1010,7 +1009,6 @@
"version": "4.13.8",
"integrity": "sha512-/Gng7NfoykZl2pjukW5Z6+8Yxm3BPRf86GTbQnt0SbySkvax4fyL4H3HhY1cCpBGmiW9XDRFzRV+CXK2W8QudQ==",
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=16.9.0"
}
@@ -1559,7 +1557,6 @@
"version": "4.6.5",
"integrity": "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==",
"license": "MIT",
- "peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
diff --git a/plugins/process-intelligence/package.json b/plugins/process-intelligence/package.json
index 5ca7e82ae..ee1cfc1e3 100644
--- a/plugins/process-intelligence/package.json
+++ b/plugins/process-intelligence/package.json
@@ -10,7 +10,7 @@
"test": "node scripts/test.mjs"
},
"dependencies": {
- "@modelcontextprotocol/sdk": "1.30.0",
+ "@modelcontextprotocol/sdk": "1.31.0",
"zod": "4.6.5"
},
"devDependencies": {
diff --git a/plugins/process-intelligence/server/bundle-meta.json b/plugins/process-intelligence/server/bundle-meta.json
index 94881d993..24500f150 100644
--- a/plugins/process-intelligence/server/bundle-meta.json
+++ b/plugins/process-intelligence/server/bundle-meta.json
@@ -4604,7 +4604,7 @@
"format": "esm"
},
"node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js": {
- "bytes": 8232,
+ "bytes": 8736,
"imports": [
{
"path": "node_modules/zod/v4/index.js",
@@ -4625,7 +4625,7 @@
"format": "esm"
},
"node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js": {
- "bytes": 40372,
+ "bytes": 46763,
"imports": [
{
"path": "node_modules/pkce-challenge/dist/index.node.js",
@@ -5753,7 +5753,7 @@
"bytesInOutput": 1464
},
"node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js": {
- "bytesInOutput": 6441
+ "bytesInOutput": 6917
},
"node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js": {
"bytesInOutput": 924
@@ -5762,7 +5762,7 @@
"bytesInOutput": 3474
},
"node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js": {
- "bytesInOutput": 21179
+ "bytesInOutput": 24025
},
"node_modules/eventsource-parser/dist/index.js": {
"bytesInOutput": 7757
@@ -5810,7 +5810,7 @@
"bytesInOutput": 8946
}
},
- "bytes": 1274176
+ "bytes": 1277498
}
}
}
diff --git a/plugins/process-intelligence/server/mcp.mjs b/plugins/process-intelligence/server/mcp.mjs
index 1495976b0..20542dc94 100644
--- a/plugins/process-intelligence/server/mcp.mjs
+++ b/plugins/process-intelligence/server/mcp.mjs
@@ -31644,7 +31644,12 @@ var OAuthTokensSchema = object({
token_type: string2(),
expires_in: coerce_exports.number().optional(),
scope: string2().optional(),
- refresh_token: string2().optional()
+ refresh_token: string2().optional(),
+ /**
+ * Not part of the wire format: the authorization server this value was obtained from, added by
+ * the client's `auth()` before it is stored and compared when it is read back.
+ */
+ issuer: string2().optional().catch(void 0)
}).strip();
var OAuthErrorResponseSchema = object({
error: string2(),
@@ -31674,7 +31679,12 @@ var OAuthClientInformationSchema = object({
client_id: string2(),
client_secret: string2().optional(),
client_id_issued_at: number2().optional(),
- client_secret_expires_at: number2().optional()
+ client_secret_expires_at: number2().optional(),
+ /**
+ * Not part of the wire format: the authorization server this value was obtained from, added by
+ * the client's `auth()` before it is stored and compared when it is read back.
+ */
+ issuer: string2().optional().catch(void 0)
}).strip();
var OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
var OAuthClientRegistrationErrorSchema = object({
@@ -31876,6 +31886,26 @@ async function parseErrorResponse(input2) {
return new ServerError(errorMessage);
}
}
+function issuersMatch(a, b) {
+ let [x, y] = [a, b];
+ try {
+ [x, y] = [new URL(a).href, new URL(b).href];
+ } catch {
+ }
+ return x === y || x.endsWith("/") && x.slice(0, -1) === y || y.endsWith("/") && y.slice(0, -1) === x;
+}
+function discardIfIssuerMismatch(stored, issuer) {
+ if (!stored)
+ return void 0;
+ if (typeof stored.issuer !== "string")
+ return stored.issuer == null ? stored : { ...stored, issuer: void 0 };
+ return issuersMatch(stored.issuer, issuer) ? stored : void 0;
+}
+var TokenResponseSchema = OAuthTokensSchema.omit({ issuer: true });
+var RegistrationResponseSchema = OAuthClientInformationFullSchema.omit({ issuer: true });
+function boundElsewhereError(stored, issuer) {
+ return new Error(`OAuth client information is bound to authorization server ${stored.issuer} and is not presented to ${issuer}. Clear the stored client information, or correct \`expectedIssuer\`, if the authorization server has moved.`);
+}
async function auth(provider, options) {
try {
return await authInternal(provider, options);
@@ -31929,9 +31959,24 @@ async function authInternal(provider, { serverUrl, authorizationCode, scope, res
authorizationServerMetadata: metadata
});
}
- const resource = await selectResourceURL(serverUrl, provider, resourceMetadata);
+ const issuer = String(authorizationServerUrl);
+ const selectedResource = await selectResourceURL(serverUrl, provider, resourceMetadata);
+ const resource = selectedResource && resourceMetadata && !provider.validateResourceURL ? resourceMetadata.resource : selectedResource;
const resolvedScope = scope || resourceMetadata?.scopes_supported?.join(" ") || provider.clientMetadata.scope;
- let clientInformation = await Promise.resolve(provider.clientInformation());
+ const storedClientInformation = await Promise.resolve(provider.clientInformation());
+ let clientInformation = discardIfIssuerMismatch(storedClientInformation, issuer);
+ const canRegisterAgain = provider.saveClientInformation !== void 0 && !!provider.redirectUrl;
+ if (storedClientInformation && !clientInformation && !canRegisterAgain) {
+ throw boundElsewhereError(storedClientInformation, issuer);
+ }
+ const unstampedClientInformation = clientInformation?.issuer == null ? clientInformation : void 0;
+ const bindClientInformation = async () => {
+ try {
+ if (unstampedClientInformation)
+ await provider.saveClientInformation?.({ ...unstampedClientInformation, issuer });
+ } catch {
+ }
+ };
if (!clientInformation) {
if (authorizationCode !== void 0) {
throw new Error("Existing OAuth client information is required when exchanging an authorization code");
@@ -31943,9 +31988,7 @@ async function authInternal(provider, { serverUrl, authorizationCode, scope, res
}
const shouldUseUrlBasedClientId = supportsUrlBasedClientId && clientMetadataUrl;
if (shouldUseUrlBasedClientId) {
- clientInformation = {
- client_id: clientMetadataUrl
- };
+ clientInformation = { client_id: clientMetadataUrl, issuer };
await provider.saveClientInformation?.(clientInformation);
} else {
if (!provider.saveClientInformation) {
@@ -31957,8 +32000,8 @@ async function authInternal(provider, { serverUrl, authorizationCode, scope, res
scope: resolvedScope,
fetchFn
});
- await provider.saveClientInformation(fullInformation);
- clientInformation = fullInformation;
+ clientInformation = { ...fullInformation, issuer };
+ await provider.saveClientInformation(clientInformation);
}
}
const nonInteractiveFlow = !provider.redirectUrl;
@@ -31969,10 +32012,14 @@ async function authInternal(provider, { serverUrl, authorizationCode, scope, res
authorizationCode,
fetchFn
});
- await provider.saveTokens(tokens2);
+ await bindClientInformation();
+ await provider.saveTokens({ ...tokens2, issuer });
return "AUTHORIZED";
}
- const tokens = await provider.tokens();
+ const tokens = discardIfIssuerMismatch(await provider.tokens(), issuer);
+ if (tokens?.refresh_token && tokens.issuer == null) {
+ console.warn("[mcp-sdk] stored OAuth tokens have no 'issuer' property (saved by an earlier version, or by a provider that does not keep it) and are used as-is; make sure your OAuthClientProvider stores what saveTokens() and saveClientInformation() receive unchanged.");
+ }
if (tokens?.refresh_token) {
try {
const newTokens = await refreshAuthorization(authorizationServerUrl, {
@@ -31983,7 +32030,8 @@ async function authInternal(provider, { serverUrl, authorizationCode, scope, res
addClientAuthentication: provider.addClientAuthentication,
fetchFn
});
- await provider.saveTokens(newTokens);
+ await bindClientInformation();
+ await provider.saveTokens({ ...newTokens, issuer });
return "AUTHORIZED";
} catch (error62) {
if (!(error62 instanceof OAuthError) || error62 instanceof ServerError) {
@@ -32206,6 +32254,9 @@ async function discoverOAuthServerInfo(serverUrl, opts) {
resourceMetadata
};
}
+function resourceIndicatorToString(resource) {
+ return typeof resource === "string" ? resource : resource.href;
+}
async function startAuthorization(authorizationServerUrl, { metadata, clientInformation, redirectUrl, scope, state, resource }) {
let authorizationUrl;
if (metadata) {
@@ -32237,7 +32288,7 @@ async function startAuthorization(authorizationServerUrl, { metadata, clientInfo
authorizationUrl.searchParams.append("prompt", "consent");
}
if (resource) {
- authorizationUrl.searchParams.set("resource", resource.href);
+ authorizationUrl.searchParams.set("resource", resourceIndicatorToString(resource));
}
return { authorizationUrl, codeVerifier };
}
@@ -32256,7 +32307,7 @@ async function executeTokenRequest(authorizationServerUrl, { metadata, tokenRequ
Accept: "application/json"
});
if (resource) {
- tokenRequestParams.set("resource", resource.href);
+ tokenRequestParams.set("resource", resourceIndicatorToString(resource));
}
if (addClientAuthentication) {
await addClientAuthentication(headers, tokenRequestParams, tokenUrl, metadata);
@@ -32273,7 +32324,7 @@ async function executeTokenRequest(authorizationServerUrl, { metadata, tokenRequ
if (!response.ok) {
throw await parseErrorResponse(response);
}
- return OAuthTokensSchema.parse(await response.json());
+ return TokenResponseSchema.parse(await response.json());
}
async function refreshAuthorization(authorizationServerUrl, { metadata, clientInformation, refreshToken, resource, addClientAuthentication, fetchFn }) {
const tokenRequestParams = new URLSearchParams({
@@ -32291,6 +32342,15 @@ async function refreshAuthorization(authorizationServerUrl, { metadata, clientIn
return { refresh_token: refreshToken, ...tokens };
}
async function fetchToken(provider, authorizationServerUrl, { metadata, resource, authorizationCode, fetchFn } = {}) {
+ const readClientInformation = async () => {
+ const storedClientInformation = await provider.clientInformation();
+ const checked = discardIfIssuerMismatch(storedClientInformation, String(authorizationServerUrl));
+ if (storedClientInformation && !checked) {
+ throw boundElsewhereError(storedClientInformation, String(authorizationServerUrl));
+ }
+ return checked;
+ };
+ let clientInformation = await readClientInformation();
const scope = provider.clientMetadata.scope;
let tokenRequestParams;
if (provider.prepareTokenRequest) {
@@ -32306,11 +32366,11 @@ async function fetchToken(provider, authorizationServerUrl, { metadata, resource
const codeVerifier = await provider.codeVerifier();
tokenRequestParams = prepareAuthorizationCodeRequest(authorizationCode, codeVerifier, provider.redirectUrl);
}
- const clientInformation = await provider.clientInformation();
+ clientInformation ?? (clientInformation = await readClientInformation());
return executeTokenRequest(authorizationServerUrl, {
metadata,
tokenRequestParams,
- clientInformation: clientInformation ?? void 0,
+ clientInformation,
addClientAuthentication: provider.addClientAuthentication,
resource,
fetchFn
@@ -32339,7 +32399,7 @@ async function registerClient(authorizationServerUrl, { metadata, clientMetadata
if (!response.ok) {
throw await parseErrorResponse(response);
}
- return OAuthClientInformationFullSchema.parse(await response.json());
+ return RegistrationResponseSchema.parse(await response.json());
}
// node_modules/eventsource-parser/dist/index.js
@@ -33813,7 +33873,7 @@ var package_default = {
test: "node scripts/test.mjs"
},
dependencies: {
- "@modelcontextprotocol/sdk": "1.30.0",
+ "@modelcontextprotocol/sdk": "1.31.0",
zod: "4.6.5"
},
devDependencies: {
@@ -34928,7 +34988,7 @@ Process Intelligence (MIT)
---
-@modelcontextprotocol/[email protected] - LICENSE
+@modelcontextprotocol/[email protected] - LICENSE
MIT License
diff --git a/plugins/process-intelligence/tests/identity.test.mjs b/plugins/process-intelligence/tests/identity.test.mjs
index 9cf5813c2..c1127934e 100644
--- a/plugins/process-intelligence/tests/identity.test.mjs
+++ b/plugins/process-intelligence/tests/identity.test.mjs
@@ -20,7 +20,7 @@ test('public plugin identity and lockfile match the marketplace entry', async ()
const lock = await json(path.join(root, 'package-lock.json'));
assert.equal(lock.name, 'process-intelligence');
assert.equal(lock.packages[''].name, 'process-intelligence');
- assert.equal(lock.packages[''].dependencies['@modelcontextprotocol/sdk'], '1.30.0');
+ assert.equal(lock.packages[''].dependencies['@modelcontextprotocol/sdk'], '1.31.0');
assert.deepEqual(Object.keys((await json(path.join(root, '.mcp.json'))).mcpServers), ['process-intelligence']);
for (const file of ['marketplace.json', '.claude-plugin/marketplace.json']) {
const index = await json(path.join(workspace, file));