Fix infrastructure as code configuration errors
Suggest a fix for infrastructure as code configuration errors that are found in the request files.
- application/json
Request Body array required
- Array [
errors object[] required
Data regarding the resource on which the fix will be applied
Array [endLine double requiredResource's end line in the file
policyId string requiredCheck ID which is being fixed
resourceId string requiredRepresentation of the resource ID which is a combination of "resource type"."resource name"
startLine double requiredResource's start line in the file
]- fileContent string required
Content of the file on which the fix will be appiled
- filePath string required
- framework string required
Framework on which the fix will be applied, e.g. terraform or cloudformation
- ]
Responses
- 200
- 422
Fixes for checkov errors
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
- Array [
- filePath string required
fixes object[] required
Array [fixedDefinition string requiredoriginalEndLine double requiredoriginalStartLine double requiredpolicyId string requiredresourceId string required]- ]
[
{
"filePath": "string",
"fixes": [
{
"fixedDefinition": "string",
"originalEndLine": 0,
"originalStartLine": 0,
"policyId": "string",
"resourceId": "string"
}
]
}
]
[
{
"filePath": "/aws/ec2.tf",
"fixes": [
{
"fixedDefinition": "resource \"aws_ebs_volume\" \"web_host_storage\" {\n # unencrypted volume\n availability_zone = \"${var.availability_zone}\"\n #encrypted = false # Setting this causes the volume to be recreated on apply \n size = 1\n tags = {\n Name = \"${local.resource_prefix.value}-ebs\"\n }\n encrypted = true\n}\n",
"originalEndLine": 33,
"originalStartLine": 25,
"policyId": "BC_AWS_GENERAL_3",
"resourceId": "aws_ebs_volume.web_host_storage"
}
]
}
]
Request arguments validation error
Loading...