@azure-devops/mcp 2.5.0-nightly.20260319 → 2.5.0-nightly.20260320

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ import { z } from "zod";
6
6
  import { StageUpdateType } from "azure-devops-node-api/interfaces/BuildInterfaces.js";
7
7
  import { ConfigurationType, RepositoryType } from "azure-devops-node-api/interfaces/PipelinesInterfaces.js";
8
8
  import { mkdirSync, createWriteStream } from "fs";
9
- import { join, resolve } from "path";
9
+ import { join, posix, resolve, win32 } from "path";
10
10
  const PIPELINE_TOOLS = {
11
11
  pipelines_get_builds: "pipelines_get_builds",
12
12
  pipelines_get_build_changes: "pipelines_get_build_changes",
@@ -336,6 +336,13 @@ function configurePipelineTools(server, tokenProvider, connectionProvider, userA
336
336
  artifactName: z.string().describe("The name of the artifact to download."),
337
337
  destinationPath: z.string().optional().describe("The local path to download the artifact to. If not provided, returns binary content as base64."),
338
338
  }, async ({ project, buildId, artifactName, destinationPath }) => {
339
+ const isAbsolutePath = (value) => posix.isAbsolute(value) || win32.isAbsolute(value);
340
+ if (artifactName.includes("..")) {
341
+ throw new Error("Invalid artifactName: path traversal is not allowed.");
342
+ }
343
+ if (destinationPath && (destinationPath.includes("..") || isAbsolutePath(destinationPath))) {
344
+ throw new Error("Invalid destinationPath: absolute paths and paths traversals are not allowed.");
345
+ }
339
346
  const connection = await connectionProvider();
340
347
  const buildApi = await connection.getBuildApi();
341
348
  const artifact = await buildApi.getArtifact(project, buildId, artifactName);
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const packageVersion = "2.5.0-nightly.20260319";
1
+ export const packageVersion = "2.5.0-nightly.20260320";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-devops/mcp",
3
- "version": "2.5.0-nightly.20260319",
3
+ "version": "2.5.0-nightly.20260320",
4
4
  "mcpName": "microsoft.com/azure-devops",
5
5
  "description": "MCP server for interacting with Azure DevOps",
6
6
  "license": "MIT",