#78 - Building AI Tools For IaC Compliance
A generated pull request can fix a control and still break the services that depend on it.
18 min read
In this guest episode, we chat with Davlet Dzhakishev, co-founder of Cloudgeni, who’s working on an AI-powered approach to fixing compliance issues in IaC. What’s the state of tools in this space? Where does his idea fit in? And how should we think about the relationship between compliance and security?
The cloud findings your GRC tool hands back to you
You buy Drata or Vanta to get through SOC 2 or ISO 27001. Policy templates, evidence collection, access reviews: handled. Then you open the cloud section and find a list of failing controls, each one linking to a page that tells you which checkbox to tick in the console. Your infrastructure is in Terraform, so the console is the wrong place to tick anything. Someone on the team now owns weeks of work nobody planned for, and the audit is waiting on it.
Davlet Dzhakishev walked into that wall and started a company about it. He is co-founder and CEO of Cloudgeni, founded in Oslo in 2024, an engineer turned entrepreneur with more than fifteen years in engineering, a stint at Microsoft, and the past eight years as a tech lead and CTO in startups. At his previous startup, a Fortune 500 customer made ISO 27001 a condition of the deal. The GRC tooling covered most of the ground. The cloud part took two to three months, not full time, but intense enough that he remembers it as the thing that sealed the idea.
The obvious question is whether that work can be generated instead of typed. Two less obvious ones sit underneath it. How much of what a compliance scanner reports is worth fixing at all. And what you get to claim about your security once you have fixed it.
From a findings dashboard to a pull request
Detection is not the gap. The GRC platforms report the failing control, the cloud providers’ own monitors report it again, and what arrives with it is documentation: here is the control, here is how to satisfy it, probably by clicking.
What does a compliance fixer produce that a scanner doesn’t?
A change in the repository that owns the resource, proposed as a pull request, instead of a page about the console.
Cloudgeni reads failing controls from the GRC tools and from the cloud providers’ monitors, shows them in its own dashboard, then maps the failing control and the failing resources back to the Terraform that created them.
Automated remediation on its own is not the novelty. AWS has shipped it for years: the Automated Security Response on AWS add-on works with Security Hub and applies predefined response and remediation actions to findings. That acts on the account. If the resource came out of Terraform, a change made in the account is drift, and your next apply can put the old value back. Patching the repository is what makes the fix hold, and it leaves you a diff to review.
The delivery shape has precedent too. Ben Goodman’s dragondrop.cloud sold Terraform best practices as a pull request back in 2023, and the big cloud security platforms will open a PR when you give them repository access. The pitch on cost is arithmetic: generation takes about five minutes, review takes the rest of the hour, against a week for the complicated cases done by hand.
There is a hard prerequisite. Your cloud has to be described in code, because a pull request needs something to patch. For a ClickOps estate, Cloudgeni’s answer is to migrate you to Terraform first, which they did for pilot customers. That is a migration project before it is a product, and worth pricing as one. terraform import loads the resource into state and writes no configuration. So someone writes the resource block by hand, or generates one from an import block with terraform plan -generate-config-out. That flag is still experimental, and it ships with an instruction to review the output before it goes into version control. The resource is under code when a plan proposes no changes to it, not when the import succeeds. Take the failing ones before the rest of the estate, so the audit’s scope is covered first. State records the configuration as it stands and nothing about how it got there, so the pull request that changed it is the record worth keeping.
Not every failing control deserves a fix
Making the change cheap to generate moves the bottleneck somewhere else: deciding which changes you want at all.
Should you fix everything a compliance scan flags?
No, and the severity label is there so you can say so out loud.
Take one finding everybody has seen. In AWS Security Hub, S3.14, S3 general purpose buckets should have versioning enabled, is a Low. AWS says Low findings don’t require action on their own, but can provide context when you correlate them with other issues. The same control page carries S3.10, which wants a lifecycle configuration on a versioned bucket: repeated overwrites accumulate billable versions unless you expire or explicitly delete them. Clearing one Low can create a Medium and an invoice.
This is where the room split. Andrey treats criticals and highs as work and most of what sits below them as a way to pay AWS more. Paulina sees the same pattern at her customers: nothing below high gets addressed, because the time is not there unless the security team pushes. The counter from Cloudgeni is the arithmetic of the tool again: “if it’s so easy to fix it, why just not fix it?”
The stronger version of that counter is the framework argument. Not every Security Hub finding maps to a SOC 2 or ISO 27001 control, so driving the queue from the framework rather than from the scanner cuts it down before anyone argues about severity, and a reasonable posture is usually enough to pass. Discretion stays with the engineer either way. Nothing described here takes that decision off you.
Compliance is a floor you can stand on, not a ceiling
Which leaves the question of what clearing the audit actually buys.
Does passing an audit mean your cloud is secure?
No. It means you cleared a minimum, and the minimum is worth clearing anyway.
Compliance gives you the bare minimum for security, which is more than nothing and well short of a defence. The controls are not arbitrary. Do not expose your database to the internet is in there because people do. Plenty of startups never look at any of it until a customer asks or an incident forces it, our own included.
The commercial reason is procurement. An enterprise buyer wants assurance that your software is not the way into their network, and a report showing which controls you track makes that conversation shorter. You do not always need the certification for this. Sometimes proof that you follow the same controls is enough to close, at a fraction of what a full GRC subscription costs.
Then there is the floor you do not get to negotiate. HIPAA reaches covered entities, meaning health plans, health care clearinghouses and health care providers who transmit health information electronically for covered transactions, plus the business associates handling PHI on their behalf. Outside that scope it does not apply to you; inside it, there is no way around it. PCI DSS works the same way for card data. Its scope is narrower than taking payments: the requirements cover the people, processes and technologies that store, process or transmit cardholder data. Every system connected to that environment, or able to affect its security, is in scope too. Hand the card handling to a service provider and fewer of your systems are in that set, which is a smaller assessment rather than an exemption. In Europe the queue keeps growing. NIS2’s transposition deadline passed on 17 October 2024, and in November 2024 the Commission called on 23 member states to finish the job, so for plenty of companies the national law is still on its way. DORA has applied to financial entities since 17 January 2025, with no transitional period. MiCA runs on a different clock: its rules for crypto-asset service providers have applied since 30 December 2024. Article 143(3) lets providers that were already trading under national law carry on under it until their authorisation is granted or refused, or until 1 July 2026, whichever comes first. Member states picked different lengths for that window, so the date that binds you is the national one.
Where a compliance fixer sits next to Wiz and Orca
None of this is happening in an empty market, and the incumbents already ship a version of the same feature.
Isn’t this what a cloud security platform already does?
They do more of it, with context a single-control check cannot see, at enterprise prices.
We have run Orca across a customer’s accounts. We have not used Wiz, so the detail here is Orca’s. One EC2 instance carried a remotely exploitable Log4j vulnerability, and its configuration put it on the public internet. On a single-signal scanner that is a drop-everything alert. Orca also read the instance state. The machine was stopped, so nothing could reach the vulnerable workload right then, while the same configuration would expose it the moment someone started it again. Orca scored it a seven instead of a nine or a ten, which is what let the team sequence the work instead of scrambling. That approach has been public since Orca launched attack path analysis in 2022: it scores paths rather than isolated findings, weighing severity, exploitability, accessibility and business impact.
Cloudgeni’s account of the big platforms is fair: comprehensive, built largely on static analysis, expensive enterprise beasts. The claimed difference is scope and price rather than a capability the incumbents lack. Orca scans live infrastructure, checks the same compliance frameworks, and will open the Terraform pull request itself when it has access to your repository. So the argument is positioning, a narrower product aimed at compliance for less money, and positioning arguments get tested when the incumbent ships the same feature inside a bundle you already pay for.
The fix that takes the database offline
The capability claim deserves a harder look, because the interesting failures are not in generating the diff.
Why can’t the tool just flip the setting?
Because the control is about one resource and the outage is about everything attached to it.
Take a control most teams have met: the database should not be reachable from the internet. Flip it to private and your services lose access, and so does the third-party analytics tool. On Azure SQL Database, getting there means a private endpoint, the virtual network and subnet around it, DNS resolving the right way and access configured, and only then the switch. That guidance is scoped to Azure SQL Database, and the same page says it does not apply to Azure SQL Managed Instance, which has its own networking model. Do the public to private flip on its own and you have bought yourself an outage.
That is the argument for reading the live cloud alongside the code rather than running a model over your .tf files: the generator needs to know what else talks to the thing it is changing. It is also the part of the claim you cannot check from the outside, which sets the order for a pilot. Begin with changes whose dependencies you have traced and found contained, and trace them rather than assume, because the usual starter examples are not free. Shorten a log group’s retention and any data older than the current retention setting is deleted. Rewrite a tag and you may have moved the resource out of whatever reads it, since tags carry cost allocation, automation and access control. Those first batches tell you how often the diff is right, and how often it is confidently wrong. Then pick one control that can take a service down, a database going private being the obvious candidate. Read what that pull request does to everything attached to the database before you let the tool near networking, IAM or data access.
Prevention beats remediation, and guardrails beat both
Remediation is a one-time payment anyway. The engineer who joins next quarter re-creates the finding, and you are back where you started.
How do you stop the same finding coming back?
Catch it before the merge, or make the bad state impossible to create in the account.
Cloudgeni’s second half is prevention, driven by the same framework rules plus custom policies. Mid-market and enterprise prospects turn out to carry their industry- and customer-specific requirements as Word and Excel documents. Cloudgeni takes that policy in natural language and maps it down to static analysis and strict rules underneath. Those rules catch the new resource at the point someone introduces it. The user-facing form is a sentence: all resources have to be encrypted. The output is the change that makes your new S3 bucket pass.
The other route starts a layer lower, in the account itself, and it comes with a commercial interest we should declare: FivexL, Andrey’s consultancy, builds AWS landing zones for a living. Take the argument on its merits. A foundation built properly keeps whole classes of misconfiguration out of the account. An SCP caps the permissions available to the IAM roles and users in your organization. A resource control policy caps the permissions available on the supported resources in your organization, which is the half that can refuse a principal from outside it. Between them, the call that would create the finding is denied rather than reported. Declarative policies, which AWS shipped in December 2024, hold a service configuration in place as the service gains features. A data perimeter bounds who and what can reach your resources. If you are starting on AWS now, that is the cheaper end of this problem.
Permissions and configuration checks are separate mechanisms, though, and that decides what you get to switch off. An RCP restricts what the API will allow. A control such as S3.14 reads the setting on the bucket that exists and reports on it regardless.
The two approaches do not compete. Guardrails keep a new organization clean. Remediation is for the four-year-old account nobody is going to rebuild.
Terraform first, and the accuracy bar they set themselves
Both approaches assume the generated change is right, which is where the engineering gets uncomfortable.
Why Terraform and nothing else?
Because that is where the pilot customers are, and because the team reckons general coding agents are weak at it.
Their reasoning: there is far less Terraform in public training data than application code, and the public examples are a mix of good and bad. They expect that to hold for IaC in general, and we have not seen a published measurement either way. Pulumi, Azure Bicep for one prospect on Azure, and the cloud-specific languages are on the roadmap, not in the product.
The bar they have to clear is the real constraint. Ops people are conservative for good reason, because any change cascades and nobody wants to shake a boat that floats. Cloudgeni’s stated acceptance bar for its own output is high: “It can’t be 70%, it has to be 90% at least.”
The 70% in that sentence comes from coding benchmarks. In February 2025 Anthropic reported Claude 3.7 Sonnet at 62.3% on SWE-bench Verified, and 70.3% with a custom scaffold. SWE-bench scores whether a model resolves real GitHub issues drawn from Python repositories, so neither number tells you how often a generated Terraform change is safe to merge. We know of no public benchmark that does. The 90% is a claim about a product. Your own repository is the only place to test it. That bar is also why the architecture is static analysis and policy tooling with a model inside it, rather than a wrapper around a model.
Clear that bar and the job changes shape. The forecast from Cloudgeni is that engineers become orchestrators, each running a stack of agents, one for SRE, one for cost, one for compliance, keeping the decisions the agents are not allowed to take. Reliability is the condition on all of it, and the route there is the same architecture: agents reaching for the static analysis and policy engines engineers already run, under whatever the model writes. Conversational quality was never the missing piece. A UC San Diego study published on 31 March 2025 found GPT-4.5 with a persona prompt was judged to be the human 73% of the time in a three-party Turing test. Sounding right arrived first. Being right about a VPC is the part still lagging.
What this means for teams
Compliance work is unplanned engineering time that arrives with a deadline attached. Tooling can generate the change, and that is genuinely useful, but it does not decide which findings matter, and it cannot patch infrastructure that only exists in the console. The judgment stays with you, and so does the merge button.
Four things you can do this week:
- Take your current cloud findings and sort them by what you would actually fix. Write the standing rule down, for example criticals and highs always, mediums and lows only when they map to a control in your framework. A written rule survives the next audit; a per-finding argument does not.
- Check how much of what is failing is even in code.
terraform state listprints Terraform addresses, not cloud ids, so match on the provider id instead:terraform state list -id=sg-1234abcdreturns the address holding that id, or read the ids out of the state attributes withterraform show -json. A resource missing from state is not therefore unmanaged, so look for another owner, CloudFormation, Pulumi or a state file you did not check, before anyone imports it. Then runterraform planon the managed ones to see what has drifted away from the code. - If you are early on AWS, spend the money on the foundation instead. SCPs, RCPs, declarative policies and a data perimeter deny the calls behind many of those findings, and you keep scanning for the controls they do not reach.
- Decide now how you review machine-written infrastructure changes. Require the plan output in the pull request, keep the same approvals you use for human changes, and work up from changes whose dependencies you have traced to one that can take a service down before you trust the tool broadly.
Common questions, answered
Do I still need Vanta or Drata if I already run AWS Security Hub?
No. GRC software gathers and organizes the evidence; neither outcome requires it. ISO 27001 is a certification against the standard; a SOC 2 is an examination report issued by a CPA firm under AICPA attestation standards, not a certificate. What Security Hub cannot cover either way is the organizational half: policies, access reviews, joiner and leaver records, vendor assessments, training evidence.
How do I handle compliance findings when everything was clicked together in the console?
Bring the resources under Terraform first, then remediate from the repository, which is the sequence Cloudgeni ran for its pilot customers. A pull request needs a file to patch, and a fix applied in the console is drift the next apply can undo.
Budget for the half the import does not do. terraform import populates state and writes no configuration. So you write the resource block yourself, or generate one from an import block with terraform plan -generate-config-out and read what comes out before it lands in version control. Count a resource as migrated only once a plan on it proposes no changes.
Take the failing resources before the rest of the estate, so the audit’s scope is under code first.
Is it safe to let an AI agent open pull requests against production Terraform?
Treat the pull request exactly like one from a new engineer: plan output attached, review by someone who knows the environment, and no automatic merge. The generated diff is a proposal, and the review is where most of the hour goes.
Calibrate on changes whose dependencies you have traced and found contained. Then put one that can take a service down through the same review, a database going private being the usual test, before you trust it on networking, IAM or data access.
Related episodes
- #57 Terraform Best Practices with Ben Goodman: dragondrop.cloud shipping Terraform improvements as pull requests, the same delivery shape two years earlier.
- #72 AWS Resource Control Policies (RCPs): the guardrails that stop a finding from being created in the first place, and how they differ from SCPs.
- #66 Multi-Account Strategy And Landing Zones: account segmentation and what a landing zone actually gives you.
- #44 Kosli with Mike Long: compliance as answerable questions about production rather than a checklist.
- #63 Yet Another AI Episode: generating infrastructure with AI, and who understands the change when the deploy breaks.
Resources
- Cloudgeni: Davlet Dzhakishev’s company, the product described throughout this post.
- Davlet Dzhakishev on LinkedIn: his background and what Cloudgeni is shipping.
- Security Hub S3 controls: settles that bucket versioning is a Low, and that versioning without lifecycle rules is its own Medium.
- Severity levels for control findings: what AWS means by Critical, High, Medium and Low, and why a Low needs no action on its own.
- Guidance for PCI DSS Scoping and Network Segmentation: the Council’s own account of which systems PCI DSS covers, and how segmentation changes that set.
- Introducing resource control policies: AWS, November 2024, on how an RCP caps permissions on resources, including access from outside the organization, where an SCP caps what principals inside it may do.
- Cloud attack path analysis: Orca’s 2022 description of scoring paths instead of findings, which is the context a per-control check lacks.
- Private endpoints for Azure SQL Database: what making that database private requires beyond the setting itself, and that it does not cover SQL Managed Instance.
Since we recorded
Cloudgeni is still going and has widened its scope well past compliance fixes. It raised $1 million in May 2026 and now sells agents for drift reconciliation, cost optimization, incident investigation and pull request review alongside compliance remediation, which is close to the DevOps teammate idea it had set aside. The accuracy question is not settled: Anthropic reported Claude Sonnet 4.5 at 77.2% on SWE-bench Verified in September 2025, but that benchmark still scores Python issue resolution, so the 90% bar for Terraform remediation stays something you test on your own repository. We came back to where AI pays off in #84 AI for DevSecOps: Current Wins and Ongoing Gaps, and to the European regulatory queue in #87 EU Compliance 101: AI Act, DORA, NIS2 explained.
