- Severity: Error
- Confidence: follows the resolution of the binding site
An options class registered via services.Configure<T>(configuration.GetSection("…")) (or bound via Bind/Get<T>) whose section does not exist in any configuration source.
Binding to a missing section does not throw — it silently produces an options instance with default values. The failure surfaces wherever a default 0, null or false finally breaks something.
A section "exists" when any configuration source (base or any environment file) contains the section key itself or any key beneath it. A section that exists only in one environment is not CL006 — cross-environment gaps are CL002 territory. If no configuration was scanned at all, the rule is silent.
services.Configure<AuditOptions>(config.GetSection("Audit")); // CL006 if no source has an Audit sectionAdd the section to the configuration, or fix the section name in the registration.