An Azure DevOps Extension for deploying to Vercel from Azure Pipelines
by vercelTypeScript
Last 12 weeks · 0 commits
3 of 6 standards met
Problem When using to deploy a project in a subdirector the vercel pull command runs without the argument, while vercel deploy correctly includes it. This causes vercel pull to create the .folder in the repository root, but looks for it in the subdirectory. Since the isn't found, Vercel cannot detect the framework configuration. This results in "No framework detected" in deployment logs and Only static assets being deployed instead of the full application (serverless functions, SSR pages, etc.) Fix Add the --cwd argument to vercelPullArgs when vercelCurrentWorkingDirectory. Testing I _have not_ tested this (apologies), but we've included this in our workaround in a pipeline.
## Bug The doesn't handle the Vercel CLI's non-interactive JSON output format. ### What happens When the CLI runs via (non-interactive), it outputs JSON to stdout instead of just the deployment URL. The extension captures the raw JSON as , which causes: 1. PR comments contain raw JSON instead of a clean URL 2. The value is included in the commands in the JSON, leaking the token in PR comments ### Root cause CLI code (): Extension code (vercel-deployment-task-source/src/index.ts): ``Successfully deployed to ${deployURL}`; // raw JSON in PR comment Suggested fix let deployURL = stdout.trim(); try { const parsed = JSON.parse(deployURL); if (parsed.deployment?.url) { deployURL = parsed.deployment.url; } } catch { // stdout is a plain URL (interactive mode), use as-is } Environment Extension: v3.0.1 Vercel CLI: latest Agent: self-hosted macOS ARM64 Azure DevOps Services
The Vercel CLI outputs JSON to stdout when running in non-interactive mode (CI/CD). The extension previously assumed stdout was always a plain URL, causing raw JSON to appear in PR comments and the token to leak in the commands. This also fixes failing on preview deployments because the raw JSON blob was passed as the deployment identifier. Fixes #56
Summary Tightens how the deployment task captures and forwards CLI output. Only the deployment URL is now extracted from stdout; the rest is discarded so unrelated CLI output does not flow into pipeline output variables, logs, or PR comments. Adds defensive scrubbing of known sensitive token patterns at every output boundary in both tasks. Marks as a secret variable when populated from the task input, so the Azure DevOps log scrubber masks it in pipeline logs. Patch-bumps both tasks and the extension manifest.
Repository: vercel/vercel-azure-devops-extension. Description: An Azure DevOps Extension for deploying to Vercel from Azure Pipelines Stars: 37, Forks: 15. Primary language: TypeScript. Languages: TypeScript (90.3%), JavaScript (9.7%). License: MIT. Topics: azure-devops, azure-pipelines, vercel. Open PRs: 2, open issues: 4. Last activity: 3mo ago. Community health: 62%. Top contributors: phidol, codybrouwers, pawlean, EndangeredMassa, aldosch, healeycodes, Ethan-Arrowood, fruitymedley, MFCo, merckxite and others.