Configuration drift detection mechanism
Why it matters
Configuration drift happens silently: a developer manually changes a production environment variable to debug an incident, forgets to revert it, and weeks later the application behaves differently in production than in staging with no explanation. NIST CM-3 requires controlled configuration change management. ISO 27001:2022 A.8.9 mandates configuration management. Without a drift detection mechanism, you cannot detect unauthorized configuration changes, reconcile environments after incidents, or demonstrate configuration control to auditors. The cost of undiscovered drift compounds: each subsequent change is made against an unknown baseline.
Severity rationale
Low because undetected configuration drift causes environment inconsistencies that are difficult to diagnose and can silently undermine security controls applied in one environment but not another.
Remediation
Version-control all configuration and use infrastructure tools that detect and report drift between desired and actual state. The simplest approach is YAML configuration files under git; the most robust is IaC with a plan step in CI.
Version-controlled config files:
config/
development.yaml
staging.yaml
production.yaml
All changes go through pull request review. Production config changes require an approved PR — no manual edits on the server.
Terraform drift detection in CI:
# .github/workflows/drift.yml
- run: terraform plan -detailed-exitcode
# exits 2 if drift detected; CI fails and alerts the team
Kubernetes: Use GitOps (Flux, ArgoCD) to continuously reconcile cluster state with git. Any manual kubectl edit is detected and reverted within minutes.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Environment Security Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-1059 — Insufficient Technical Documentation
- nist:rev5 · CM-3 — Configuration Change Control
- iso-27001:2022 · A.8.9 — Configuration management
- soc2:2017 · CC7.1 — Detection and monitoring of configuration changes and vulnerabilities
Taxons
History
- 2026-04-18·v1.0.0·Initial import from environment-security·automated
- 2026-07-06·v1.0.1·Add SOC 2 TSC mapping (CC7.1) from the verified compliance crosswalk register (docs/compliance/).·by soc2-mapping-enrichment-ship-2