Skip to content

Security baseline

Apply the product’s security defaults together with effective Azure Policy and approved requirements. Source validation checks specific patterns; reviews and runtime evidence cover requirements that source scans cannot establish.

The pinned baseline is the behavioral reference. Required adversarial reviews use the human-selected 10-Challenger agent, not a Challenger subagent.

#RuleBicep PropertyTerraform ArgumentWAF Pillar
1TLS 1.2 minimumminimumTlsVersion: 'TLS1_2'min_tls_version = "1.2"SE:07
2HTTPS-only trafficsupportsHttpsTrafficOnly: truehttps_traffic_only_enabled = trueSE:07
3No public blob accessallowBlobPublicAccess: falseallow_nested_items_to_be_public = falseSE:05
4Managed Identity preferredidentity: { type: 'SystemAssigned' }identity { type = "SystemAssigned" }SE:05
5Microsoft Entra ID-only SQL authazureADOnlyAuthentication: trueazuread_authentication_only = trueSE:05
6Private PaaS data services and APIspublicNetworkAccess: 'Disabled'public_network_access_enabled = falseSE:06
7No shared key access on storageallowSharedKeyAccess: falseshared_access_key_enabled = falseSE:05
8App Service HTTP/2 enabledhttp20Enabled: truehttp2_enabled = trueSE:07
9Container Registry admin user disabledadminUserEnabled: falseadmin_enabled = falseSE:05

PaaS data services use private endpoints and disabled public access in every environment, including development, except for the Azure Monitor case below. App Service APIs must be private. App Service hosting a public-facing web application may use public HTTPS ingress; the remaining identity and security controls still apply. VNet integration is outbound connectivity, not an inbound private endpoint. Unsupported services or incompatible SKUs require an explicit design decision, not a silent public fallback.

Log Analytics and workspace-based Application Insights may use authenticated public query and ingestion endpoints when effective policy and approved requirements allow them. Record query and ingestion settings separately. Retain HTTPS/TLS, Entra query authentication, least-privilege access, supported authenticated ingestion, and local-auth controls.

This exception does not apply to Storage, SQL, Key Vault, ACR, or other data services. Require Azure Monitor Private Link Scope when policy or approved isolation requirements demand private monitoring. Plan its scoped resources, endpoints, DNS, and client connectivity before disabling public endpoints. Do not silently relax existing private-only requirements.

Private DNS resolution is mandatory. Project IaC provisions DNS unless verified central infrastructure or an effective DeployIfNotExists policy owns the specific components. Check assignment scope, parameters, zone IDs, permissions, deployment behavior and remediation before omitting those components. A zone-group policy does not prove the DNS zone or VNet link exists. Do not duplicate policy-owned DNS; verify resolution from intended clients. See DINE evaluation and private endpoint DNS.

WAF pillar key: SE:05 = Identity & access, SE:06 = Network security, SE:07 = Encryption.

The validator also catches these anti-patterns:

PatternBicepTerraformSeverity
Redis non-SSL portenableNonSslPort: trueenable_non_ssl_port = trueBlocks deployment
FTPS allowedftpsState: 'AllAllowed'ftps_state = "AllAllowed"Blocks deployment
Remote debuggingremoteDebuggingEnabled: trueremote_debugging_enabled = trueBlocks deployment
Cosmos DB local authdisableLocalAuth: falselocal_authentication_disabled = falseBlocks deployment
PostgreSQL SSL disabledsslEnforcement: 'Disabled'ssl_enforcement_enabled = falseBlocks deployment
MySQL SSL disabledsslEnforcement: 'Disabled'ssl_enforcement_enabled = falseBlocks deployment
Key Vault network opennetworkAcls.defaultAction: 'Allow'default_action = "Allow"Warning
Wildcard CORSallowedOrigins: ['*']allowed_origins = ["*"]Warning
Storage OAuth defaultdefaultToOAuthAuthentication: falsedefault_to_oauth_authentication = falseWarning

The security baseline is checked at multiple points in the workflow:

  1. CodeGen runs the required source checks before preparing the deployment handoff.
  2. Deploy checks current code and evidence before preview and apply. Reuse requires matching inputs, scope, and freshness. A prior PASSED string alone is insufficient.
  3. Product git hooks and CI run their configured checks. Inspect their actual scope rather than assuming every operation passed through them.
Run the security baseline validator
# Check all IaC files
npm run validate:iac-security-baseline
# Explicitly reviewed public web application, isolated in a known Web App resource/module file
npm run validate:iac-security-baseline -- --public-web-app infra/bicep/project/web-app.bicep
# Full validation suite (includes security baseline)
npm run validate:all

The validator uses regex-based single-line pattern matching. Nested or multi-line property assignments (e.g., a property split across multiple lines) may not be caught. Plan/code review must cover the requirements that the source scan cannot prove. A review is not a substitute for actual connectivity or application-health checks.

The public-web flag accepts a dedicated known Web App resource or AVM-module file, not mixed-resource files. Use the corresponding .tf path for Terraform. The flag declares reviewed scope; it does not approve an API’s public exposure. Automated runs without that scope remain fail-closed. Source scans cannot prove endpoint coverage, module internals or DNS resolution. Those require plan/code review and actual connectivity evidence.

When refining previously approved requirements under this baseline, return to Requirements for reconciliation, independent review and renewed approval. Do not silently rewrite approved project artifacts or treat old findings as current evidence for changed inputs.