DriftGuard
Infrastructure Drift Detection & Self-Healing for multi-cloud environments.
DriftGuard compares your Infrastructure-as-Code (Terraform, Pulumi, CloudFormation) desired state against live cloud resources to detect unauthorized changes, security misconfigurations, and cost anomalies.
Features
- Multi-cloud drift detection — Azure, AWS, and GCP resource state readers
- IaC state parsing — Terraform (.tfstate v3/v4), Pulumi exports, CloudFormation templates
- 32 security rules — Open ports, public storage, missing encryption, IAM wildcards, weak TLS, and more
- 8 cost rules — Oversized instances, unattached volumes, missing tags, premium storage
- 8 compliance rules — Data residency, encryption at rest, audit logging, retention periods
- Drift classification — Automated categorization as unauthorized/intentional/emergency
- IaC remediation — Auto-generate Terraform HCL or Pulumi Python to fix drift
- GitHub PR generation — Create PRs with remediation code
- Historical tracking — SQLite-backed drift history with trend analysis
- Baseline management — Accept known deviations with optional TTL
- MCP server — 7 tools for Claude/AI integration
- CLI —
scan,watch,fix,history,report,baseline,policycommands
Quick Start
pip install autoai-driftguard
# Scan a Terraform state file
driftguard scan --state terraform.tfstate --provider azure
# Continuous monitoring
driftguard watch --state terraform.tfstate --interval 300
# View drift history
driftguard history --severity critical
# Generate remediation code
driftguard fix --scan-id scan-abc123 --format terraform
# List security policies
driftguard policy list --category security
# Generate posture report
driftguard report --days 30
Quick Start -- MCP Server
Add to your Claude Code or Cursor MCP config:
{
"mcpServers": {
"driftguard": {
"command": "uvx",
"args": ["autoai-driftguard-mcp"],
"description": "DriftGuard — Detect infrastructure drift across Azure, AWS, and GCP"
}
}
}
That's it. No signup. No API key. No data leaves your machine.
Available Tools
| Tool | Description |
|---|---|
drift_scan |
Scan for drift across cloud providers |
drift_history |
View drift detection history |
drift_classify |
Classify drift as unauthorized/intentional/emergency |
drift_fix |
Generate IaC remediation code |
drift_policy |
Manage security/cost/compliance policies |
drift_baseline |
Manage accepted deviations |
drift_report |
Generate drift posture report |
Cloud Provider Setup
Azure
export ARM_CLIENT_ID="..."
export ARM_CLIENT_SECRET="..."
export ARM_TENANT_ID="..."
export ARM_SUBSCRIPTION_ID="..."
AWS
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_DEFAULT_REGION="us-east-1"
GCP
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"
export GOOGLE_CLOUD_PROJECT="my-project"
Configuration
| Environment Variable | Description | Default |
|---|---|---|
DRIFTGUARD_DB |
SQLite database path | driftguard.db |
GITHUB_TOKEN |
GitHub token for PR creation | — |
Development
git clone https://github.com/autoailabadmin/driftguard.git
cd driftguard
pip install -e ".[dev]"
pytest
License
Apache 2.0 — see LICENSE.
Built by AutoAI Labs.
Metadata
Release files for autoai-driftguard 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autoai_driftguard-0.1.0.tar.gz | 75.7 kB | Without provenance | Details for autoai_driftguard-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autoai_driftguard-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for autoai_driftguard-0.1.0-py3-none-any.whl |
Total release size: 137.7 kB
Release files / autoai_driftguard-0.1.0.tar.gz
| Download URL | autoai_driftguard-0.1.0.tar.gz |
|---|---|
| Size | 75.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c657a7dbe7436c2b4914b6a84c2c21f05a4fab65ef27a5a72d23702e731ca406
|
|
BLAKE2b-256 checksum How to use checksums |
8b8acfb85f7530fd23117b9517ab8dc09f91680b840333e18bf351c460856bc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Release files / autoai_driftguard-0.1.0-py3-none-any.whl
| Download URL | autoai_driftguard-0.1.0-py3-none-any.whl |
|---|---|
| Size | 61.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4599a189d75de846d7b899aaa7d315f91c21f420dc7dec6ae2a368f9db05a2b
|
|
BLAKE2b-256 checksum How to use checksums |
f650b8eb61bf73091e72f1692a9e5d535ae899665a37a36d6d4a0a40f4553603
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Security for autoai-driftguard 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.