[BUG] Azure.Resource.UseTags applies to Microsoft.SecurityInsights/dataConnectors, which cannot be tagged

オープン 初心者向け
#3,959 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@huong8373tt-beep がすでに取り組んでいます。

2026年10月26日 から。

  • #3962 @huong8373tt-beep による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
azure, powershell
領域
testing-qa

調査の方向性

まずセレクター Azure.Resource.SupportsTags とルール Azure.Resource.UseTags を読み、セレクターの除外がどのようにテストされているかを確認します。Microsoft.SecurityInsights/dataConnectors のテストを追加し、Microsoft.SecurityInsights/* のほかの子リソース型も除外すべきか判断します。コネクターが Azure.Resource.UseTags に違反しなくなり、関連するテストが通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

Existing rule

Azure.Resource.UseTags (AZR-000166), via selector Azure.Resource.SupportsTags

Description of the issue

Sentinel data connectors (Microsoft.SecurityInsights/dataConnectors) are
extension resources on a Log Analytics workspace and have no tags property in
the resource schema, so there is no way to make the rule pass. The
Azure.Resource.SupportsTags selector does not exclude Microsoft.SecurityInsights/
types, so every data connector (for example one deployed with the AVM module
avm/res/security-insights/data-connector) fails.

To Reproduce
resource workspace 'Microsoft.OperationalInsights/workspaces@2025-07-01' existing = {
  name: 'log-example'
}

resource connector 'Microsoft.SecurityInsights/dataConnectors@2025-09-01' = {
  scope: workspace
  name: '00000000-0000-0000-0000-000000000000'
  kind: 'AzureSecurityCenter'
  properties: {
    subscriptionId: '00000000-0000-0000-0000-000000000000'
    dataTypes: { alerts: { state: 'Enabled' } }
  }
}

Run Invoke-PSRule with Azure.GA_2025_12: Azure.Resource.UseTags fails on the connector.

Expected behaviour

Microsoft.SecurityInsights/dataConnectors (and likely the other
Microsoft.SecurityInsights/* child types, which also have no tags) is excluded
from Azure.Resource.SupportsTags.

Reference: https://learn.microsoft.com/azure/templates/microsoft.securityinsights/dataconnectors

Module version: PSRule.Rules.Azure 1.47.0

主要言語
PowerShell
スター
449
フォーク
109
PR マージ指標
30日以内にマージされた PR はありません

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/PSRule.Rules.Azure のほかの issue

Azure/PSRule.Rules.Azure の issue をすべて見る

似ている issue

Testing & QA の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。