Duvaxa

DevOps & Cloud · Drift detection

DriftTrail

Know who changed production.

Every change made outside Terraform, with the person, the time and the channel from your cloud's audit log, how risky it is, and whether to revert it or adopt it into the code.

Platform teams where engineers still have console accessSecurity teams preparing for SOC 2, ISO 27001 or RBI auditsMSPs managing Terraform for several clients
drift-trail · example
$ drift-trail check plans/ --cloudtrail cloudtrail.json
9 resources changed outside Terraform in 2 workspaces: 2 critical, 3 high; who found for 8
CRITICAL aws_security_group.api DT002 Opened to the internet
priya@acme.example via AWS console, AuthorizeSecurityGroupIngress
CRITICAL aws_s3_bucket_public_access_block.assets DT003 Made public, DT011 root account
MEDIUM aws_autoscaling_group.web desired_capacity: 3 -> 6 Adopt
Real run on the built-in demo: two workspaces and their CloudTrail events.
ReadsTerraform plans, audit logs
NamesWho, when, and how
FlagsPublic, open, unencrypted
WritesCode to adopt changes

The problem

Terraform shows that production no longer matches the code, but not who opened SSH to the internet from the console, whether that matters, or that the on-call engineer's 2 a.m. database resize will be undone by the next apply. Teams either ignore drift or spend an afternoon in CloudTrail for every change.

What it does

01

Reads refresh-only plans from any number of workspaces and lists every changed attribute, with policies compared statement by statement

02

Names who made each change from AWS CloudTrail, the Azure Activity Log or Google Cloud audit logs: the person or service account, the time, the API call and the source IP

03

Shows how it was done: the AWS, Azure or Google Cloud console, a CLI, a script, or another Terraform, CloudFormation or Pulumi run

04

Ranks drift by risk: opened to the internet, made public, encryption off, access policy widened, backups reduced, logging off, root account used

05

Says what to do: revert security-weakening changes, adopt capacity fixes with the Terraform code ready to paste

06

Nightly GitHub Action with a job summary, an HTML report, a CSV tracker and annotations on the resource block

07

Sensitive values are never shown; read-only CloudTrail lookups with your own credentials

How it works

  1. Run a refresh-only Terraform plan for each workspace
  2. DriftTrail finds who changed what in CloudTrail and ranks it
  3. Revert the risky changes, paste the code for the ones to keep

Works with

TerraformOpenTofuAWS CloudTrailAzure Activity LogGoogle Cloud Audit LogsGitHub ActionsGitHub code scanning

Runs in your CI

GitHub Actions workflow step
# Nightly drift check
terraform plan -refresh-only -out drift.plan && terraform show -json drift.plan > prod.json
drift-trail collect prod.json --out cloudtrail.json
drift-trail check prod.json --cloudtrail cloudtrail.json --format md --out drift.md --html drift.html --fail-on high
Licensed customers get the action or command-line tool installed in their own organisation; it runs on your runners, so your code and plans never leave them. The command-line tools run in GitLab CI the same way.

Your data

  • Runs in your CI or on your laptop; nothing is uploaded.
  • Values Terraform marks sensitive are never printed.
  • Audit logs are read with read-only lookups only.

Who it's for

Platform teams where engineers still have console accessSecurity teams preparing for SOC 2, ISO 27001 or RBI auditsMSPs managing Terraform for several clients

Questions

Doesn't terraform plan already show drift?

It shows that something changed. DriftTrail adds who changed it, how risky it is, and whether to revert or keep it, across all your workspaces in one report.

What if the change is older than 90 days?

Point it at your CloudTrail log files in S3 instead of the 90-day event history, and it reads those.

Related

Often used with DriftTrail

See DriftTrail on your own data

A 30-minute call. We run the product on your export, repository or document and walk you through the results.

Book a demo