drift-detector
Skill by snyk
Detects infrastructure drift between Terraform state and actual cloud resources using the Snyk CLI. Built for teams that need to find unmanaged resources, manual changes and configuration drift in AWS, Azure or GCP.
Install drift-detector
Built from the published package, never by AI.
git clone --depth 1 https://github.com/snyk/studio-recipes /tmp/studio-recipes && mkdir -p ~/.claude/skills && cp -r /tmp/studio-recipes/command_directives/synchronous_remediation/skills/drift-detector ~/.claude/skills/drift-detectorRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/snyk/studio-recipes /tmp/studio-recipes && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/studio-recipes/command_directives/synchronous_remediation/skills/drift-detector ~/.gemini/antigravity-cli/skills/drift-detectorAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Drift Detector is an agent skill that compares Terraform state with the resources that exist in AWS, Azure or GCP. It runs the snyk iac describe command and sorts findings into unmanaged resources, changed resources and missing resources. Each category is given a risk level, and the skill suggests remediation steps such as importing, removing or reverting resources.
The skill covers setup, scanning, analysis, remediation and prevention. It can scan local or remote state, limit the scan to specific services, and output JSON for reports. It also describes generating an exclude policy for expected drift and adding drift checks to CI/CD. The source says it is meant for users who check for infrastructure drift, look for unmanaged cloud resources, or audit infrastructure changes.
Written from the project's SKILL.md and checked against it.
What it can do
- Basic drift scanCompares a local Terraform state file with actual cloud resources using snyk iac describe.
- Remote state scanScans state stored in an S3 backend or Terraform Cloud workspace.
- Specific service scanLimits the drift check to chosen services such as aws_s3, aws_ec2 or aws_rds.
- JSON outputWrites the drift results to a JSON file for further analysis.
- Drift categorizationGroups findings as unmanaged, changed or missing, each with a risk level.
- Remediation guidanceDescribes importing, removing, reverting or adopting drifted resources in Terraform.
- Exclude policy generationCreates a .snyk policy file to exclude expected drift from future results.
- CI/CD integrationProvides an example GitHub Actions step that fails when unmanaged resources are found.
What you need
- Snyk CLI installed and authenticated
- Cloud provider credentials for AWS, Azure or GCP
- Terraform state file, local or remote
- Network access to cloud APIs
Try asking
- Check my Terraform state for infrastructure drift in AWS
- Find unmanaged cloud resources that are not in my Terraform code
- Scan only aws_s3 and aws_rds for drift and output a JSON report
Good to know
- Read-only: it detects drift and does not modify resources.
- Not all resource types are supported; see SERVICES.md for the list.
- A Terraform state file is required to compare against.
- Needs live access to cloud APIs and valid credentials.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: command_directives/synchronous_remediation/skills/drift-detector/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Bash Read Write Grep
Alternatives to drift-detector
All alternatives →Runs the full Next.js deployment test suite for an internal vercel/next.js pull request. It validates the commit's preview package, then dispatches the test_e2e_deploy_release.yml workflow. Meant for maintainers who explicitly ask for the entire suite.
Instruments Python AI applications with DeepEval's native tracing so their execution appears span by span in Confident AI's Observatory. It is for developers building LLM apps, agents, RAG pipelines and chatbots.
Manages Azure Container Registry through the az acr Azure CLI command group. It covers registries, images, cloud builds, ACR Tasks, tokens, geo-replication and networking. Built for developers and operators who work with ACR in Azure.
Opens, runs, and shows apps on a temporary Crabbox machine, including native desktops and web previews. It is for OpenClaw users who want an app running and visible in their chat side panel.
Runs batch and HPC workloads on GKE using job queues and parallel processing. Aimed at teams running batch pipelines, HPC simulations, or ML training jobs on Google Kubernetes Engine.
Answers questions about GKE cluster and workload costs using BigQuery billing exports and live cluster metrics. Built for platform engineers and cloud teams who need to analyze and diagnose GKE spend.
Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli
drift-detector: common questions
Does Drift Detector change my cloud resources?
No. The source says the skill only detects drift and does not modify resources. Remediation steps are written as guidance for the user to run.
Which cloud providers does it support?
The source lists AWS, Azure and GCP. Each needs its own credentials, such as an AWS profile, an Azure CLI login or GCP application default credentials.
Can it scan Terraform state stored remotely?
Yes. The source shows scans of state in an S3 backend and in Terraform Cloud workspaces, the latter using a TFC token.
How do I install drift-detector?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is drift-detector free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is drift-detector safe to use?
It scores 71 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to drift-detector?
Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.
