Skip to content

Governance Anti Patterns Containers

Joshua Davis edited this page Apr 1, 2026 · 6 revisions

Containers

Anti-patterns are automatically detected in AI-generated output after each stage. When a pattern matches and no safe pattern exempts it, a warning is shown.

Container Apps, ACR, and container runtime configuration detection

2 checks


Check Description Agents
ANTI-CONT-001 Secrets in environment variables detected — use Key Vault references with managed identity instead.

Triggers on: environment_variable, env_var
Exempted by: key vault, keyvault, managed identity, secret_ref, secretref
all agents
ANTI-CONT-002 Container registry admin credentials detected — use managed identity with AcrPull role assignment.

Triggers on: admin_user_enabled = true, acrpush
Exempted by: managed identity, acrpull
all agents

ANTI-CONT-001

Secrets in environment variables detected — use Key Vault references with managed identity instead.

Triggers on:

  • environment_variable
  • env_var

Exempted by:

  • key vault
  • keyvault
  • managed identity
  • secret_ref
  • secretref

Correct patterns:

  • secret_ref
  • secretRef
  • # Use Key Vault references with managed identity
  • keyVaultUrl

ANTI-CONT-002

Container registry admin credentials detected — use managed identity with AcrPull role assignment.

Triggers on:

  • admin_user_enabled = true
  • acrpush

Exempted by:

  • managed identity
  • acrpull

Correct patterns:

  • admin_user_enabled = false
  • adminUserEnabled = false
  • "AcrPull"
  • # Use managed identity with AcrPull role assignment

Home

Getting Started

Stages

Interfaces

Configuration

Agent System

Features

Quality

Help

Governance

Policies — Azure

AI Services

Compute

Data Services

Identity

Management

Messaging

Monitoring

Networking

Security

Storage

Web & App

Policies — Well-Architected

Reliability

Security

Cost Optimization

Operational Excellence

Performance Efficiency

Integration

Anti-Patterns
Standards

Application

IaC

Principles

Transforms

Clone this wiki locally