Use this when systems drift away from compliance baselines.
Drift Detection · Compliance Automation
Drift detection in compliance automation spots when a system moves away from its approved baseline, often because of manual changes, and raises a finding or triggers remediation.
1. Compliance drift detection compares scans over time.
2. Alert on regressions.
3. Find causes.
4. Remediate.
5. Prevent via policy as code.
scan N vs scan N-1 → regressions → alert
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as stale policy, incomplete input, exception creep, false compliance from missing data, destructive auto-remediation and passing policy check without validating actual target, choosing the cases most relevant to scheduled/event-driven desired-versus-actual reads, normalized diff, ignored fields, freshness and creating a reviewable drift record before remediation.
Step 2 Common mistakes Narrow the fault
- Drift detection with no owner for the findings.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Manual changes are the usual cause.
- Detect continuously.
- Decide fix or exception.
- Compliance drift alerts — detection
- Scan diff between runs — changes
- Root cause of regressions — prevention
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Compliance drift detection finds systems that have moved away from their required configuration — a disabled firewall, a re-enabled legacy protocol, an extra local admin. Checking only at deployment time misses everything that changes afterwards.
| Method | Example |
|---|---|
| Scheduled scans | OpenSCAP, CIS-CAT, Nessus compliance |
| Config comparison | Device running-config vs golden template |
| Declarative tools in monitor mode | DSC ApplyAndMonitor, Ansible --check --diff |
| Cloud policy | Azure Policy, AWS Config rules |
Report drift with the specific rule, system and difference, track time-to-remediate, and decide per rule whether automation may correct it automatically or a human should review first.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Compliance Automation > Drift Detection. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.openpolicyagent.org/docs/latest/ · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For scheduled/event-driven desired-versus-actual reads, normalized diff, ignored fields, freshness and creating a reviewable drift record before remediation, prefer typed fields and stable IDs over human presentation text.