Skip to content

fix: add defense-in-depth SQL Entra-only auth checks - #1678

Merged
kvenkatrajan merged 1 commit into
microsoft:mainfrom
tmeschter:20260402-Issue-1661
Apr 2, 2026
Merged

fix: add defense-in-depth SQL Entra-only auth checks#1678
kvenkatrajan merged 1 commit into
microsoft:mainfrom
tmeschter:20260402-Issue-1661

Conversation

@tmeschter

Copy link
Copy Markdown
Member

Fixes #1661.

Problem

In integration test run #135, the entra-sql-auth test failed because the agent generated SQL Server Bicep containing administratorLoginPassword despite correctly setting azureADOnlyAuthentication: true. The root cause: the agent never loaded the sql-database/auth.md or sql-database/bicep.md reference files that explicitly prohibit this property. PR #1550 addressed the primary discovery issue by adding more cross-reference links, but the prohibition language still lives only in those leaf reference files.

How this helps

This PR adds defense-in-depth by surfacing the SQL Entra-only auth requirement at three workflow stages, so the agent encounters the prohibition even if it shortcuts the reference chain:

  1. research.md — New "Container Apps + API + SQL Database" research pattern (mirrors the existing App Service + SQL pattern) that explicitly loads auth.md and bicep.md
  2. security.md — New checklist item in the Identity & Access section: "SQL Server: Entra-only auth — do NOT generate administratorLogin or administratorLoginPassword"
  3. generate.md — New security requirement: "SQL Server Bicep must use Entra-only auth — omit administratorLogin and administratorLoginPassword entirely"

Add redundant SQL Entra-only auth guidance at the security hardening
and generation steps so the prohibition is seen even if the agent
skips the sql-database reference chain. Also add a Container Apps +
SQL Database research pattern alongside the existing App Service one.

Addresses microsoft#1661.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR strengthens the azure-prepare skill’s “Entra-only Azure SQL auth” guidance by surfacing the prohibition on SQL admin credentials earlier and more frequently in the workflow, reducing the chance the agent generates Bicep with administratorLogin/administratorLoginPassword when azureADOnlyAuthentication: true is required.

Changes:

  • Bump azure-prepare skill version to 1.1.4.
  • Add a security checklist item explicitly forbidding SQL admin login/password properties for Entra-only auth.
  • Add a new research pattern and a generation-time security requirement that both point directly to the SQL auth/Bicep reference files.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
plugin/skills/azure-prepare/SKILL.md Bumps skill metadata version to reflect updated guidance.
plugin/skills/azure-prepare/references/security.md Adds an Identity & Access checklist item to forbid administratorLogin/administratorLoginPassword and links to SQL auth guidance.
plugin/skills/azure-prepare/references/research.md Adds a “Container Apps + API + SQL Database” research pattern that explicitly loads SQL auth/Bicep references.
plugin/skills/azure-prepare/references/generate.md Adds a security requirement to omit SQL admin login/password properties entirely and links to the SQL Bicep reference.

@kvenkatrajan
kvenkatrajan merged commit 2f787c3 into microsoft:main Apr 2, 2026
16 checks passed
Barbara 4bes (Ba4bes) pushed a commit to Ba4bes/GitHub-Copilot-for-Azure that referenced this pull request Apr 24, 2026
Add redundant SQL Entra-only auth guidance at the security hardening
and generation steps so the prohibition is seen even if the agent
skips the sql-database reference chain. Also add a Container Apps +
SQL Database research pattern alongside the existing App Service one.

Addresses microsoft#1661.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Integration test failure: azure-prepare – Entra SQL auth Bicep includes administratorLoginPassword [Assertion mismatch]

3 participants