Infrastructure & Delivery Code Hygiene

Terraform, container, Kubernetes, and CI workflow hygiene.

Choose a focused Infrastructure & Delivery recipe

This collection contains 7 bounded Infrastructure & Delivery workflows. Choose the recipe whose objective matches the repository evidence instead of combining unrelated cleanup into one run.

How to use this collection

Read the repository’s configured runtime, compiler, framework, analyzer, and test commands before selecting a workflow. Start in audit mode, record file and symbol evidence, and authorize a fix only after the candidate scope is reviewable. Preserve supported versions, public behavior, and existing tool configuration.

If the evidence is a named CVE, scanner finding, exposed secret, authorization flaw, or injection path, use the focused vulnerability-remediation playbook instead of a code-hygiene recipe. Stop when the safe result requires an owner decision about architecture, compatibility, production data, or deployment state.

Full recipe list

Terraform format, validation, and provider-lock hygiene

development

Terraform format, validation, and provider-lock hygiene: Keep configuration canonical and provider resolution reproducible.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygieneplatformterraformfmtvalidateprovider-lock

Terraform state-address and refactor safety

development

Terraform state-address and refactor safety: Preserve resource identity through module and address refactors.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygieneplatformterraformstatemoved-blocksrefactor

Dockerfile layer, cache, and build-context hygiene

development

Dockerfile layer, cache, and build-context hygiene: Make container builds reproducible, cache-efficient, and free of accidental context.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygieneplatformdockerdockerfilelayerscachebuild-context

Container signal, healthcheck, and shutdown hygiene

development

Container signal, healthcheck, and shutdown hygiene: Make PID 1 signal handling, readiness, health, and graceful shutdown correct.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygieneplatformcontainerssignalshealthcheckshutdown

Kubernetes schema, deprecation, and selector drift

development

Kubernetes schema, deprecation, and selector drift: Remove deprecated fields and prevent selector and label contract drift.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygieneplatformkubernetesschemadeprecationselectors

Kubernetes probe, resource, and rollout hygiene

development

Kubernetes probe, resource, and rollout hygiene: Make probes, resources, disruption, and rollout settings internally consistent.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygieneplatformkubernetesprobesresourcesrollout

CI workflow timeout, concurrency, and cache hygiene

development

CI workflow timeout, concurrency, and cache hygiene: Bound CI jobs and prevent stale caches and duplicate workflow races.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygieneplatformciworkflowstimeoutsconcurrencycache