Skip to content

Critical: Remove UserSecretsId and update package references to latest versions - #8

Draft
Paul Yuknewicz (paulyuk) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-fb928f19-6601-47ed-a8ef-738254180116
Draft

Critical: Remove UserSecretsId and update package references to latest versions#8
Paul Yuknewicz (paulyuk) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-fb928f19-6601-47ed-a8ef-738254180116

Conversation

Copilot AI commented Sep 29, 2025

Copy link
Copy Markdown

This PR addresses critical security and compatibility updates for the Azure Functions AZD timer template, implementing changes propagated from functions-quickstart-dotnet-azd PR #18.

🔒 Security Fix

Removed hardcoded UserSecretsId from timer.csproj to prevent exposure of secrets in template repositories:

<!-- REMOVED -->
<UserSecretsId>09bd123b-3401-4507-b92c-0b283b95b537</UserSecretsId>

Templates should not include hardcoded UserSecretsId values as they can expose sensitive configuration data.

📦 Package Updates

Updated Azure Functions package references to latest stable versions for improved compatibility and security:

  • Microsoft.Azure.Functions.Worker: 1.21.0 → 2.0.0
  • Microsoft.Azure.Functions.Worker.Sdk: 1.17.0 → 2.0.5
  • Microsoft.ApplicationInsights.WorkerService: 2.22.0 → 2.23.0
  • Microsoft.Azure.Functions.Worker.ApplicationInsights: 1.2.0 → 2.0.0

The Timer extension package remains at 4.3.1 as it's already at the current stable version.

🏗️ Infrastructure Update

Removed the APPLICATIONINSIGHTS_CONNECTION_STRING output from infra/main.bicep to align with current best practices:

// REMOVED
output APPLICATIONINSIGHTS_CONNECTION_STRING string = monitoring.outputs.name

Impact

  • Security: Eliminates exposed secrets from template
  • Compatibility: Updates to latest Azure Functions v2.0 packages
  • Consistency: Aligns with current best practices across all Azure Functions AZD templates

This change is part of a comprehensive batch propagation across 19 Azure Functions AZD templates to maintain consistency and security standards.

Closes #7

Original prompt

This section details on the original issue you should resolve

<issue_title>Critical: Remove UserSecretsId and update package references to latest versions</issue_title>
<issue_description>## 🚨 Critical Updates Needed - Propagation from functions-quickstart-dotnet-azd PR Azure-Samples/functions-quickstart-dotnet-azd-timer#18

This issue tracks critical changes that need to be applied to maintain consistency across Azure Functions AZD templates, based on PR Azure-Samples/functions-quickstart-dotnet-azd-timer#18 merged on August 7, 2025.

Required Changes

1. 🔒 Remove UserSecretsId from .csproj

Security Issue: Templates should not include hardcoded UserSecretsId values.

<!-- REMOVE this line from any .csproj files -->
<UserSecretsId>09bd123b-3401-4507-b92c-0b283b95b537</UserSecretsId>

2. 📦 Update Package References to Latest Versions

Update all Azure Functions package references in .csproj files:

<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.3.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.0.2" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.5" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.23.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="2.0.0" />

3. 🏗️ Remove Application Insights from Bicep Outputs

Remove this line from infra/main.bicep:

// REMOVE this line
output APPLICATIONINSIGHTS_CONNECTION_STRING string = monitoring.outputs.name

Impact

  • Security: Removes exposed secrets from template
  • Compatibility: Updates to latest stable versions
  • Consistency: Aligns with current best practices across all Azure Functions AZD templates

Reference

Related Templates

This same issue applies to:

  • functions-quickstart-dotnet-azd-eventgrid-blob
  • functions-quickstart-dotnet-azd-cosmosdb
  • functions-quickstart-dotnet-azd-sql
  • durable-functions-quickstart-dotnet-azd

/cc Thiago Almeida (@nzthiago)</issue_description>

<agent_instructions>please perform the change and test</agent_instructions>

Comments on the Issue (you are Copilot in this section)

Paul Yuknewicz (@paulyuk) ## 🎯 Enhanced Batch Propagation Workflow - Execution Complete

This issue is part of a comprehensive batch propagation that successfully executed the enhanced workflow across 19 Azure Functions AZD templates.

📈 Discovery Results

🎯 Coverage Summary

✅ High-Priority .NET Templates (Issues Created)

📋 Remaining Templates (14 total)

Sample issues created for Python and TypeScript. Similar infrastructure updates needed for:

  • 4 Python templates
  • 4 TypeScript templates
  • 2 JavaScript templates
  • 2 PowerShell templates
  • 1 Java template

🔧 Enhanced Workflow Features

  • Dynamic Discovery: Found 58% more templates than static lists
  • Source Analysis: Automated diff analysis from GitHub API
  • Best Practice Validation: Framework ready (AZD CLI required)
  • Community Engagement: All issues tagged maintainer for coordination
  • Comprehensive Documentation: Full execution logs and change requirements

This demonstrates the enhanced batch propagation workflow successfully iden...

Fixes #7

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: paulyuk <1968137+paulyuk@users.noreply.github.com>
Copilot AI changed the title [WIP] Critical: Remove UserSecretsId and update package references to latest versions Critical: Remove UserSecretsId and update package references to latest versions Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Critical: Remove UserSecretsId and update package references to latest versions

2 participants