Skip to content

Security Baseline

Non-negotiable security requirements for all generated infrastructure code.

The security baseline is enforced by the validate:iac-security-baseline validator (pre-commit hook + CI pipeline) and the challenger-review-subagent at adversarial review gates. Violations block code generation and deployment.

#RuleBicep PropertyTerraform Argument
1TLS 1.2 minimumminimumTlsVersion: 'TLS1_2'min_tls_version = "1.2"
2HTTPS-only trafficsupportsHttpsTrafficOnly: truehttps_traffic_only_enabled = true
3No public blob accessallowBlobPublicAccess: falseallow_nested_items_to_be_public = false
4Managed Identity preferredidentity: { type: 'SystemAssigned' }identity { type = "SystemAssigned" }
5Azure AD-only SQL authazureADOnlyAuthentication: trueazuread_authentication_only = true
6Public network disabled (prod)publicNetworkAccess: 'Disabled'public_network_access_enabled = false

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
Key Vault network opennetworkAcls.defaultAction: 'Allow'default_action = "Allow"Warning
Wildcard CORSallowedOrigins: ['*']allowed_origins = ["*"]Warning

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

  1. CodeGen Phase 4npm run validate:iac-security-baseline runs after lint/review subagents. Violations are a hard gate before adversarial review.
  2. Deploy Preflight — the validator runs again before what-if/plan analysis. Conditional skip if CodeGen already passed (security_validation_status: PASSED).
  3. Pre-commit hooklefthook.yml runs the validator on staged .bicep/.tf files.
  4. CI pipelinevalidate:_node includes the security baseline in the parallel validation suite.
Terminal window
# Check all IaC files
npm run validate:iac-security-baseline
# 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. The challenger-review-subagent provides a second layer of defense for patterns the regex cannot detect.