From cd20a602640da456075f88412474538cc74e4078 Mon Sep 17 00:00:00 2001 From: Victor Vazquez Date: Thu, 8 Jan 2026 02:37:56 +0000 Subject: [PATCH 1/2] Replace DAC due to - [SM05138] Detect unsafe use of DefaultAzureCredential --- cli/azd/extensions/microsoft.azd.extensions/CHANGELOG.md | 6 +++++- cli/azd/extensions/microsoft.azd.extensions/extension.yaml | 2 +- .../resources/languages/javascript/commands/prompt.js | 4 ++-- .../resources/languages/python/commands/prompt_command.py | 4 ++-- cli/azd/extensions/microsoft.azd.extensions/version.txt | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cli/azd/extensions/microsoft.azd.extensions/CHANGELOG.md b/cli/azd/extensions/microsoft.azd.extensions/CHANGELOG.md index 9d2ffeac98f..46ae289e85d 100644 --- a/cli/azd/extensions/microsoft.azd.extensions/CHANGELOG.md +++ b/cli/azd/extensions/microsoft.azd.extensions/CHANGELOG.md @@ -1,6 +1,10 @@ # Release History -## Unreleased +## 0.8.0 (2026-01-08) + +- Remove Default Azure Credential from JS and Python scaffolding + +## 0.7.1 (2025-12-17) - Fixes bug during `release` when setting `--prerelease` flag - Fixes bug during `build` - execute permissions not set on binary for POSIX systems diff --git a/cli/azd/extensions/microsoft.azd.extensions/extension.yaml b/cli/azd/extensions/microsoft.azd.extensions/extension.yaml index 7cbfb7be360..1d0e9d1a3f3 100644 --- a/cli/azd/extensions/microsoft.azd.extensions/extension.yaml +++ b/cli/azd/extensions/microsoft.azd.extensions/extension.yaml @@ -5,7 +5,7 @@ language: go displayName: AZD Extensions Developer Kit description: This extension provides a set of tools for AZD extension developers to test and debug their extensions. usage: azd x [options] -version: 0.7.1 +version: 0.8.0 capabilities: - custom-commands examples: diff --git a/cli/azd/extensions/microsoft.azd.extensions/internal/resources/languages/javascript/commands/prompt.js b/cli/azd/extensions/microsoft.azd.extensions/internal/resources/languages/javascript/commands/prompt.js index 664dd2c21f9..ed9901f7c98 100644 --- a/cli/azd/extensions/microsoft.azd.extensions/internal/resources/languages/javascript/commands/prompt.js +++ b/cli/azd/extensions/microsoft.azd.extensions/internal/resources/languages/javascript/commands/prompt.js @@ -1,6 +1,6 @@ const { Command } = require('commander'); const AzdClient = require('../azdClient'); -const { DefaultAzureCredential } = require('@azure/identity'); +const { AzureDeveloperCliCredential } = require('@azure/identity'); const { ResourceManagementClient } = require('@azure/arm-resources'); const logger = require('../logger'); @@ -87,7 +87,7 @@ function createPromptCommand() { logger.info('Subscription selected', { subscription_id }); logger.info('Tenant', { tenant_id }); - const credential = new DefaultAzureCredential(); + const credential = new AzureDeveloperCliCredential({ tenantId: tenant_id }); const armClient = new ResourceManagementClient(credential, subscription_id); let resource_type = ''; diff --git a/cli/azd/extensions/microsoft.azd.extensions/internal/resources/languages/python/commands/prompt_command.py b/cli/azd/extensions/microsoft.azd.extensions/internal/resources/languages/python/commands/prompt_command.py index 422da3c1c2d..aa877ca8726 100644 --- a/cli/azd/extensions/microsoft.azd.extensions/internal/resources/languages/python/commands/prompt_command.py +++ b/cli/azd/extensions/microsoft.azd.extensions/internal/resources/languages/python/commands/prompt_command.py @@ -2,7 +2,7 @@ import os sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) from azd_client import AzdClient -from azure.identity import DefaultAzureCredential +from azure.identity import AzureDeveloperCliCredential from azure.mgmt.resource import ResourceManagementClient from rich.console import Console import prompt_pb2 @@ -60,7 +60,7 @@ async def execute(self): context["scope"]["tenant_id"] = sub_response.subscription.tenant_id # Setup Azure credentials and clients - credential = DefaultAzureCredential(exclude_interactive_browser_credential=False) + credential = AzureDeveloperCliCredential(tenant_id=context["scope"]["tenant_id"]) arm_client = ResourceManagementClient(credential, context["scope"]["subscription_id"]) providers = list(arm_client.providers.list()) diff --git a/cli/azd/extensions/microsoft.azd.extensions/version.txt b/cli/azd/extensions/microsoft.azd.extensions/version.txt index 7deb86fee42..8adc70fdd9d 100644 --- a/cli/azd/extensions/microsoft.azd.extensions/version.txt +++ b/cli/azd/extensions/microsoft.azd.extensions/version.txt @@ -1 +1 @@ -0.7.1 \ No newline at end of file +0.8.0 \ No newline at end of file From bfea6f89a5336cee725c26b0c92ed89842ae5e0a Mon Sep 17 00:00:00 2001 From: Victor Vazquez Date: Thu, 8 Jan 2026 02:39:00 +0000 Subject: [PATCH 2/2] link to PR --- cli/azd/extensions/microsoft.azd.extensions/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/azd/extensions/microsoft.azd.extensions/CHANGELOG.md b/cli/azd/extensions/microsoft.azd.extensions/CHANGELOG.md index 46ae289e85d..ed10c7a6e6c 100644 --- a/cli/azd/extensions/microsoft.azd.extensions/CHANGELOG.md +++ b/cli/azd/extensions/microsoft.azd.extensions/CHANGELOG.md @@ -2,7 +2,7 @@ ## 0.8.0 (2026-01-08) -- Remove Default Azure Credential from JS and Python scaffolding +- [[#6474]](https://github.com/Azure/azure-dev/pull/6474) Remove Default Azure Credential from JS and Python scaffolding ## 0.7.1 (2025-12-17)