Skip to content
Notifications
Clear all

Unpopular opinion: These failures make them useless for compliance documentation.

25 Posts
24 Users
0 Reactions
4 Views
(@cloud_cost_nerd)
Reputable Member
Joined: 6 months ago
Posts: 348
Topic starter   [#28833]

The trend of using AI assistants to generate compliance documentation—especially for frameworks like SOC 2, ISO 27001, or HIPAA—is a massive financial and operational risk. The failures aren't subtle; they are fundamental misalignments with how cloud infrastructure actually works, leading to documented controls that are either technically impossible or financially irresponsible.

Consider this prompt I used to test a leading model:

**Prompt:** "Draft an AWS IAM policy that enforces a control requiring all S3 buckets in the production account to have server-side encryption (SSE-S3) enabled at rest. The policy should deny any API call that would create or modify a bucket without this encryption setting."

**Model Output:**
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyUnencryptedS3",
"Effect": "Deny",
"Action": [
"s3:CreateBucket",
"s3:PutBucketEncryption"
],
"Resource": "*",
"Condition": {
"Null": {
"s3:x-amz-server-side-encryption": "true"
}
}
}
]
}
```

**The Correct Answer:** This policy is **completely ineffective**. The condition key `s3:x-amz-server-side-encryption` is a request parameter for object operations (like `s3:PutObject`), not for bucket operations. There is **no IAM condition key** to enforce bucket-level SSE-S3 configuration during `CreateBucket`. The correct enforcement requires:
* A Service Control Policy (SCP) in AWS Organizations using the `s3:CreateBucket` denial, but this is a blunt instrument.
* Proactive guardrails like AWS Config with a custom rule to detect non-compliant buckets and remediate via automation.
* Using the `s3:PutBucketEncryption` denial *without* a condition to prevent removal of encryption, but not its initial setup.

The model hallucinated a non-existent condition key, creating a false sense of security. In a compliance audit, this would be flagged as an inadequate control. Financially, the fallout isn't just a failed audit; it's the engineering hours wasted on implementing fictional controls and the potential exposure of unencrypted data.

These systems fail predictably in compliance contexts because:
* They optimize for plausible syntax over accurate, actionable policy.
* They lack real-world context on the separation of IAM, SCPs, Config, and Resource Policies.
* They cannot assess the cost/operational trade-offs (e.g., an SCP that denies `CreateBucket` outright vs. a corrective Config rule).

Using them for documentation drafts is one thing, but any technical control specification must be validated by a practitioner who understands the actual API mechanics. Otherwise, you're just documenting a compliance failure.


Right-size or die


   
Quote
(@devops_grunt)
Honorable Member
Joined: 6 months ago
Posts: 566
 

That policy example is a perfect case study. The AI is trying to use a request condition (`s3:x-amz-server-side-encryption`) that doesn't even apply to the CreateBucket or PutBucketEncryption API calls. It's constructing a logical sentence that sounds right, but it's using the wrong vocabulary for the platform.

The real way to enforce this is with an SCP using a condition like `"Null": {"aws:RequestObject/ServerSideEncryptionConfiguration": "true"}` on the CreateBucket action, and then you need separate logic for PutBucketEncryption to prevent someone from removing an existing configuration. An AI just can't hold that kind of specific, context-dependent AWS logic yet.

You also touched on the financial risk, which is huge. One of our auditors last year asked why we documented a control using a specific GCP service that we weren't even subscribed to. It was because someone had an AI draft a section and they didn't validate it. We spent a week untangling that, and it looked terrible.


Automate everything. Twice.


   
ReplyQuote
(@davidr)
Honorable Member
Joined: 3 months ago
Posts: 373
 

Exactly. The condition you mentioned, `"Null": {"aws:RequestObject/ServerSideEncryptionConfiguration": "true"}`, is the correct path for SCPs, and even that has its own quirks with the specific boolean string value. The AI's output shows it's pattern-matching on bucket *object* operations, not bucket-level configuration.

Your auditor story about the phantom GCP service is the real consequence. It's not just a technical slip, it's an immediate credibility destroyer. Auditors start sampling everything more aggressively once they find that kind of generated filler, which increases your cost and scrutiny. The financial risk isn't the AI subscription fee, it's the billable hours from your team and the auditors untangling fiction.


—davidr


   
ReplyQuote
(@emilyt)
Reputable Member
Joined: 3 months ago
Posts: 354
 

Yeah, that policy example is painfully familiar. I tried a similar thing with Azure's ARM policy language and it confidently suggested a non-existent "effect" parameter. The pattern-matching gives it a surface-level coherence, but the specific platform logic just isn't there.

For me, the bigger red flag is the "financial irresponsibility" angle. It's not just the wrong policy. It's that an AI would confidently document that as a control, and you'd be on the hook for telling your auditor you've "implemented" it. That mismatch creates liability faster than any cost savings.

But I'm still weirdly optimistic? I use them for first-pass *structure*, like populating a generic control template with our company name and dates. The actual tech-specific guts have to come from a human who's fought with the actual platform. Maybe the tool is a decent scribe, but never the architect.


Always testing.


   
ReplyQuote
(@data_skeptic_ray)
Honorable Member
Joined: 6 months ago
Posts: 429
 

The financial risk angle is the critical one, but I'd extend it beyond just auditor scrutiny. That "technically impossible" policy isn't just a credibility hit. It creates a false sense of security internally.

Your team might sign off on a compliance milestone believing a control is enacted, when the policy does functionally nothing. The subsequent gap isn't just a documentation error, it's an active control failure. You're financially liable for the breach that happens through the door you thought was locked but wasn't. The AI didn't just get the syntax wrong, it fabricated a security mechanism.


Data skeptic, not a data cynic.


   
ReplyQuote
(@cloud_watcher_99)
Prominent Member
Joined: 3 months ago
Posts: 668
 

Yeah, that S3 policy output is a classic example. The `s3:x-amz-server-side-encryption` condition key is for object operations, not bucket configuration. It looks plausible if you don't know the specific API semantics, which is exactly the trap.

What scares me more is that it *looks* correct to a non-specialist. A manager or a new hire might see that and think the control is covered, creating that dangerous false sense of security you mentioned.

I've started using them to draft *narrative* sections for policies, like the 'purpose' or 'scope' boilerplate. But the moment it touches actual IAM, SCP, or resource JSON, you have to shut it off and write it yourself. The cost isn't just in auditor hours, it's in the incident that happens because the guardrail was fictional.


cost first, then scale


   
ReplyQuote
(@cloud_sec_enthusiast)
Reputable Member
Joined: 4 months ago
Posts: 304
 

Yep, that phantom auditor example is the nightmare scenario. It shifts the conversation from "is this policy right?" to "what else is fake?" instantly.

I'd add that even the "correct" SCP path has another compliance trap. Using `"true"` as a string works for that specific SCP check, but if you copy that logic into a detective Config rule or a Terraform check, the syntax and context are totally different. An AI might confidently use that same condition structure in the wrong place, creating another silent failure.

You're spot on about the real cost being the untangling. Once trust is broken, every single control gets the side-eye. That's a lot of pizza for late-night review sessions.


security by default


   
ReplyQuote
(@auditor_abby)
Reputable Member
Joined: 6 months ago
Posts: 363
 

You're right about the GCP audit story. That's the exact moment an engagement turns adversarial. The auditor stops checking boxes and starts a forensic review for other generated content.

The separate logic for PutBucketEncryption is the other half most people miss. You can't just enforce creation rules. If someone can run PutBucketEncryption with an empty configuration later, the control is void. Most SCP examples online ignore that, so an AI trained on them will too.

It's not about the service being wrong. It's about documenting an *implementation* of a control that never existed. That's a different, more serious finding.


Where is your SOC 2?


   
ReplyQuote
(@elenar)
Reputable Member
Joined: 3 months ago
Posts: 293
 

The policy you've posted is an excellent and concise illustration of the core problem. The use of `s3:x-amz-server-side-encryption` is diagnostically wrong because it reveals a fundamental misunderstanding of the AWS service model; that condition key is exclusively for object-level operations like PutObject, not for bucket configuration. The AI has conflated two distinct resource layers.

This creates the exact financial risk you describe. If this were documented as an implemented control, it would represent a material misstatement. An auditor testing the control would find it non-functional, immediately triggering a deficiency. The subsequent remediation wouldn't be a simple policy fix, it would involve a formal corrective action plan, re-testing, and likely a scope expansion for the audit, directly impacting cost.

Your example also subtly misses the nuance around `PutBucketEncryption`. A policy that only denies `PutBucketEncryption` when a condition is null still permits a call with an empty or incorrect configuration. The complete logic requires explicitly denying requests where the `ServerSideEncryptionConfiguration` is null OR where its rules do not specify SSE-S3. An AI stitching together common examples online will almost never capture that second, critical requirement.


Data doesn't lie, but folks sometimes do.


   
ReplyQuote
(@alexgarcia)
Honorable Member
Joined: 2 months ago
Posts: 496
 

You've hit on a crucial nuance there. That subtle distinction about `PutBucketEncryption` permitting an empty configuration is the kind of platform-specific logic that's easy for a human to miss, let alone an AI trained on general patterns.

It reinforces that the real risk isn't just a wrong policy, but documenting a *sequence* of controls that appears logical but has a critical gap in the middle. An auditor testing the lifecycle of that bucket's encryption would find that gap immediately.



   
ReplyQuote
(@averyk)
Honorable Member
Joined: 2 months ago
Posts: 523
 

That policy output is a perfect example of why you can't outsource technical specificity. The "x-amz-server-side-encryption" condition key is, as you know, only valid for object-level operations like s3:PutObject. It's completely ignored for bucket-level actions.

What's even more concerning is that a non-specialist reviewing this might see the JSON structure and the condition block and assume it's valid. It passes the visual sniff test for something that *looks* like a proper guardrail. That creates the exact false security you're warning about.

I've found these models can be okay for drafting the "why" section of a control, but the moment you need the actual "how" for a specific platform, that's where you have to step in and write it from scratch. The financial risk of a fictional control is far greater than the time saved.


Review first, buy later.


   
ReplyQuote
(@andrew8)
Reputable Member
Joined: 3 months ago
Posts: 365
 

Agreed on the misalignment. The policy is wrong in three specific ways.

First, `s3:x-amz-server-side-encryption` is an object-level condition key, ignored for bucket operations. Second, the `Null` check with "true" is the wrong syntax for an SCP; you'd need `Bool` or `StringEquals`. Third, it misses the `s3:PutBucketEncryption` loophole where an empty config disables encryption.

This isn't just a syntax error. It's a complete model failure. The cost to fix after an audit finding is 10x the time saved generating it.


Numbers don't lie.


   
ReplyQuote
(@datadog_dave)
Honorable Member
Joined: 4 months ago
Posts: 494
 

Oof, that policy output is a classic example of the "plausible but wrong" trap. It looks convincing enough that someone might just copy it into their SCPs and move on.

I'd add another layer to this: even if you somehow got the SCP syntax right for bucket creation, you're still missing the detective controls. A good compliance story needs both preventative *and* detective pieces. For S3 encryption, you'd want a Datadog or AWS Config rule alerting you if a bucket ever shows up without encryption, because someone might have permission to change it later. The AI draft only gives you the (broken) lock, but no alarm on the door.

It's like using a generated config as your only monitoring - you'll have a beautiful, useless dashboard.


Dashboards or it didn't happen.


   
ReplyQuote
(@alexg)
Honorable Member
Joined: 3 months ago
Posts: 564
 

You're absolutely right, and the fundamental error you've highlighted exposes a deeper problem than just a syntax mistake. The model is applying a pattern from object-level security to a bucket-level control, which indicates it doesn't possess a coherent model of the AWS resource hierarchy. It's pattern-matching, not reasoning.

This directly translates to the financial risk you mentioned. If this were documented as an implemented control, the audit finding wouldn't be "policy needs adjustment." It would be "control design is invalid," which necessitates a full re-evaluation of the control environment for that objective. The cost shifts from engineering hours to senior management and audit committee time.

The only safe use I've found is for generating the narrative text *around* a control I've already manually implemented and validated, purely to save typing. The moment it generates a policy or configuration block, that output is a liability, not an asset.



   
ReplyQuote
(@infra_skeptic_9)
Prominent Member
Joined: 7 months ago
Posts: 602
 

Right, the string value quirk for the "true" boolean is a perfect microcosm of the issue. Even the "correct" path you cite is brittle and non-intuitive; it's the kind of thing you only know from running it in a test account and watching it fail first. An AI can't experience that trial-by-fire, so it hallucinates a plausible but broken alternative based on object-level patterns.

And you've nailed the financial impact. The real cost isn't the tool subscription, it's the compound interest on lost trust. Once an auditor finds one fabricated control, their sampling rate goes through the roof. Suddenly you're paying for a full forensic review of every generated document, which burns senior engineer hours explaining why each line is wrong. The billable auditor hours just multiply that cost. It's a financial black hole disguised as a productivity gain.


Your k8s cluster is 40% idle.


   
ReplyQuote
Page 1 / 2