Registry
Ccodemod avatar

codemod/arm-client-cert-auth-endpoints

Require client certificate authentication on Azure App Service ARM resources by setting properties.clientCertEnabled to true and properties.clientCertMode to Required.

codemod0 executions

  • azure
  • arm
  • app-service
  • security
Connect a repo
npx codemod @codemod/arm-client-cert-auth-endpoints

@codemod/arm-client-cert-auth-endpoints

Require client certificate authentication on Azure App Service ARM resources by rewriting Microsoft.Web/sites and Microsoft.Web/sites/slots resource definitions in ARM template JSON files.

What It Changes

For each matching App Service resource, the codemod ensures:

  • properties.clientCertEnabled is true
  • properties.clientCertMode is "Required"

If the resource has no properties object, the codemod creates one.

Scope

  • Targets JSON ARM templates with a top-level resources array
  • Rewrites Microsoft.Web/sites
  • Rewrites Microsoft.Web/sites/slots
  • Leaves unrelated Azure resource types unchanged
  • Leaves already compliant App Service resources unchanged

Usage

bash
pnpm dlx codemod@latest workflow run -w . --target /path/to/templates

Development

bash
pnpm test
pnpm run check-types
pnpm dlx codemod@latest workflow validate -w .

License

MIT

Ready to evolve your codebase?

Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.