---
title: "Unified Fix"
method: POST
path: "/remediation/fix"
---

# Unified Fix

`POST /remediation/fix`

## Request

- Base URL: `https://emfirge.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://emfirge.cloud/remediation/fix`
- Auth: none declared

Unified fix endpoint: generates HCL + verifies it in one call.

Flow:
1. If rule_id has a deterministic mutation → verify instantly + generate HCL in parallel
2. If not → generate HCL via Claude → parse HCL → simulate → verify
3. Fallback: if HCL parsing fails → return HCL without verification

Returns both the terraform fix AND the verification result.
Rate limited: 5/min per IP + 10/day per account.

## Query parameters

- `raw` boolean

## Request body

- TerraformGenerateRequest
  - `rule_id` string, nullable
  - `severity` string, required
  - `issue` string, required
  - `recommendation` string, required
  - `resource_id` string, nullable
  - `resource_type` string, nullable
  - `region` string, nullable
  - `aws_service` string, required
  - `attack_path` string[], nullable
  - `blast_radius` integer, nullable
  - `account_id` string, nullable
  - `analysis_id` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/emfirge/apis/aws-risk-analysis-agent.md) · [All operations](https://skmtc.dev/emfirge/apis/aws-risk-analysis-agent/llms.txt) · [OpenAPI document](https://skmtc.dev/emfirge/apis/aws-risk-analysis-agent/revisions/149a9263d07a?raw)
