devops security
1 TopicWhy does PSRule produce more findings than Template Analyzer when both use PSRule Azure rules?
PSRule for Azure vs Template Analyzer: Why Are the Findings Different When Scanning the Same Bicep Infrastructure? Hi everyone, I'm investigating differences between PSRule for Azure and Template Analyzer when scanning the same Bicep-based Infrastructure-as-Code repository in Azure DevOps. My understanding is that Template Analyzer integrates with PSRule for Azure. Therefore, I expected both tools to produce broadly consistent findings. However, I'm observing differences in both the number and types of findings. Environment: Azure DevOps Pipelines Bicep and Bicep parameter files (.bicepparam) Azure Verified Modules (AVM) Template Analyzer 0.8.6 PSRule.Rules.Azure version 1.32.1 or later Observed results: PSRule for Azure: 18 findings. Examples: Microsoft.DBforMySQL/flexibleServers/mysql-dev: Consider using Microsoft Entra ID-only authentication. Microsoft.Storage/storageAccounts/vulnstorageavm001: Storage accounts should only accept secure traffic. Template Analyzer: 10 findings. Examples: AZR-000216: Azure.Template.Resources AZR-000166: Azure.Resource.UseTags AZR-000168: Azure.ResourceGroup.Name AZR-000268: Azure.VNET.Name The PSRule results appear to include security configuration checks against individual Azure resource types, whereas Template Analyzer reports a different set of template validation, naming, tagging, and governance-related findings. Questions: Does Template Analyzer expand Bicep modules and Azure Verified Modules in the same way as standalone PSRule for Azure? Does Template Analyzer bundle a specific version of PSRule.Rules.Azure, or does it use the version installed in the pipeline? How can we identify the effective version? Is Template Analyzer intentionally limited to a subset of PSRule findings, even when IncludeNonSecurityRules is set to true? Are additional configuration settings required to enable Bicep parameter-file expansion and nested module expansion? Does Template Analyzer support the same Bicep parameter-file scenarios as standalone PSRule, particularly when using AVM modules from a registry? For repositories primarily using Bicep and AVM, should standalone PSRule for Azure be considered the more comprehensive option for Azure resource security assessment? My objective is to understand whether these differences are expected and identify the recommended scanning configuration for Bicep deployments using AVM modules and parameter files in Azure DevOps. Any technical clarification or recommended configuration examples would be greatly appreciated. Thanks in advance!39Views0likes2Comments