From 8244598028f6b1d47e207002c98d8de6836affe8 Mon Sep 17 00:00:00 2001 From: Jochen Delabie Date: Sat, 18 Jul 2026 15:35:33 +0200 Subject: [PATCH] Fix: task.addattachment blocked by restricted command mode (found in live test) Running the packaged 0.3.0 task on a real agent surfaced: ##vso[task.addattachment] is not allowed in this step due to policy restrictions The restrictions.commands.mode="restricted" added to tb-main/task.json in the Phase 2 "modern task metadata" work does not allow task.addattachment, which is exactly how TBMain hands the results payload to the build-results tab. With it blocked, the attachment was never written and the tab showed "No test results found". The mock-test harness doesn't enforce the agent's command policy, so this only appeared on a real run. - Remove the commands.mode="restricted" restriction from tb-main/task.json (keep the settableVariables allowlist, which works and adds real value). - Bump 0.3.0 -> 0.3.1. tb-stop-tunnel keeps restricted mode: it only emits ##vso[task.complete], which IS allowed in restricted mode. --- .DS_Store | Bin 10244 -> 10244 bytes package-lock.json | 4 ++-- package.json | 2 +- tb-main/package.json | 2 +- tb-main/task.json | 3 --- tb-stop-tunnel/package.json | 2 +- 6 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.DS_Store b/.DS_Store index 257f0d1536d7377625debcfba7b9a6b001b59bd9..6f14a9879b07e6196821d42a9b16220293b579ef 100644 GIT binary patch delta 809 zcmZn(XbG6$&uF$WU^hRb*=8OAK}J1J24@Bz21kZa1{Vfb20eych7`}7{N$vZ{3Hej z1_1^JrXnD%_a6)xHcJYsF`5f9q%ssU0^&~Uo16gT6emdBMEQVq%X3X21 zC3KL{RDi*k!5?f{5Q86sCqop_@(>{H59DF9o{52hk#BOC$mb*uh5&{{pk>)WG9Bau zOiLK~pbiDPnE^w6Qh9L!)MGo63UV@wOAHLIF)}f;u(Gjpuyb&8OfD1@o~$nBT+hMD z!5J?gQC)3eXsM%MZf0Jqqfl*WWT2y9Vr*7h%gG_CtZy9@pPiGNm)`}l3+PBj2+hC? zrD0Szkb&Wpvf!e;ocz3Wpd3gaCqoc0^c{i0;tPs}$q}N;%Iv@}PG%?qhH3#Yl+irP z-~`lIx4A&HmQ7ZWp&S?*NkCEr^@Zve}Eu*(1d delta 152 zcmZn(XbG6$&uFkQU^hRb!Db!-LB`Ggf=Z0)+zjpvr3^U?1q^8nnLs*~L60Geq1ZDg zKRGEUKZ${XL4bjQQGD_RA(_nwgjO?%nC%6Cr diff --git a/package-lock.json b/package-lock.json index bb7a34c..e4cb594 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vso-testingbot-plugin", - "version": "0.3.0", + "version": "0.3.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "vso-testingbot-plugin", - "version": "0.3.0", + "version": "0.3.1", "license": "MIT", "devDependencies": { "@babel/core": "^8.0.1", diff --git a/package.json b/package.json index 4e90fd2..1c875f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vso-testingbot-plugin", - "version": "0.3.0", + "version": "0.3.1", "description": "TestingBot integration with Azure DevOps", "scripts": { "clean": "rimraf dist Packages \"tb-*/index.js\" \"tb-*/index.js.map\" \"tb-*/tests/**/*.js\" \"tb-*/tests/**/*.js.map\"", diff --git a/tb-main/package.json b/tb-main/package.json index f658be7..a601569 100644 --- a/tb-main/package.json +++ b/tb-main/package.json @@ -1,6 +1,6 @@ { "name": "tb-main", - "version": "0.3.0", + "version": "0.3.1", "description": "TestingBot Configuration task", "private": true, "main": "index.js", diff --git a/tb-main/task.json b/tb-main/task.json index a76a89b..11d57f3 100644 --- a/tb-main/task.json +++ b/tb-main/task.json @@ -126,9 +126,6 @@ { "name": "TB_BUILD_NAME", "description": "Build name reported to TestingBot." } ], "restrictions": { - "commands": { - "mode": "restricted" - }, "settableVariables": { "allowed": [ "TB_KEY", diff --git a/tb-stop-tunnel/package.json b/tb-stop-tunnel/package.json index 95a1a5d..7f30cc4 100644 --- a/tb-stop-tunnel/package.json +++ b/tb-stop-tunnel/package.json @@ -1,6 +1,6 @@ { "name": "tb-stop-tunnel", - "version": "0.3.0", + "version": "0.3.1", "description": "Stop TestingBot Tunnel task", "private": true, "main": "index.js",