curl --request POST \
--url https://api.codeant.ai/api/analysis/results/iac \
--header 'Content-Type: application/json' \
--data '
{
"repo": "owner/repository",
"commit_id": "abc123def456",
"access_token": "ghp_xxxxxxxxxxxx",
"service": "github"
}
'{
"results": [
{
"check_type": "terraform",
"results": {
"failed_checks": [
{
"bc_check_id": "BC_AWS_NETWORKING_31",
"check_id": "CKV_AWS_23",
"check_name": "Ensure every security group and rule has a description",
"file_path": "/owner/repository/abc123def456/terraform/main.tf",
"file_line_range": [
2,
25
],
"check_class": "checkov.terraform.checks.resource.aws.SecurityGroupRuleDescription",
"code_block": [
[
2,
"resource \"aws_security_group\" \"web\" {\n"
],
[
3,
" name_prefix = \"web-sg\"\n"
],
[
4,
"\n"
],
[
5,
" ingress {\n"
],
[
6,
" from_port = 22\n"
],
[
7,
" to_port = 22\n"
],
[
8,
" protocol = \"tcp\"\n"
],
[
9,
" cidr_blocks = [\"0.0.0.0/0\"]\n"
],
[
10,
" }\n"
],
[
11,
"\n"
],
[
12,
" ingress {\n"
],
[
13,
" from_port = 80\n"
],
[
14,
" to_port = 80\n"
],
[
15,
" protocol = \"tcp\"\n"
],
[
16,
" cidr_blocks = [\"0.0.0.0/0\"]\n"
],
[
17,
" }\n"
],
[
18,
"\n"
],
[
19,
" egress {\n"
],
[
20,
" from_port = 0\n"
],
[
21,
" to_port = 0\n"
],
[
22,
" protocol = \"-1\"\n"
],
[
23,
" cidr_blocks = [\"0.0.0.0/0\"]\n"
],
[
24,
" }\n"
],
[
25,
"}\n"
]
],
"resource": "aws_security_group.web",
"start_line": 2,
"end_line": 25
}
]
}
}
]
}Retrieves Infrastructure as Code (IaC) security scanning results for a specific repository and commit
curl --request POST \
--url https://api.codeant.ai/api/analysis/results/iac \
--header 'Content-Type: application/json' \
--data '
{
"repo": "owner/repository",
"commit_id": "abc123def456",
"access_token": "ghp_xxxxxxxxxxxx",
"service": "github"
}
'{
"results": [
{
"check_type": "terraform",
"results": {
"failed_checks": [
{
"bc_check_id": "BC_AWS_NETWORKING_31",
"check_id": "CKV_AWS_23",
"check_name": "Ensure every security group and rule has a description",
"file_path": "/owner/repository/abc123def456/terraform/main.tf",
"file_line_range": [
2,
25
],
"check_class": "checkov.terraform.checks.resource.aws.SecurityGroupRuleDescription",
"code_block": [
[
2,
"resource \"aws_security_group\" \"web\" {\n"
],
[
3,
" name_prefix = \"web-sg\"\n"
],
[
4,
"\n"
],
[
5,
" ingress {\n"
],
[
6,
" from_port = 22\n"
],
[
7,
" to_port = 22\n"
],
[
8,
" protocol = \"tcp\"\n"
],
[
9,
" cidr_blocks = [\"0.0.0.0/0\"]\n"
],
[
10,
" }\n"
],
[
11,
"\n"
],
[
12,
" ingress {\n"
],
[
13,
" from_port = 80\n"
],
[
14,
" to_port = 80\n"
],
[
15,
" protocol = \"tcp\"\n"
],
[
16,
" cidr_blocks = [\"0.0.0.0/0\"]\n"
],
[
17,
" }\n"
],
[
18,
"\n"
],
[
19,
" egress {\n"
],
[
20,
" from_port = 0\n"
],
[
21,
" to_port = 0\n"
],
[
22,
" protocol = \"-1\"\n"
],
[
23,
" cidr_blocks = [\"0.0.0.0/0\"]\n"
],
[
24,
" }\n"
],
[
25,
"}\n"
]
],
"resource": "aws_security_group.web",
"start_line": 2,
"end_line": 25
}
]
}
}
]
}Repository identifier (format varies by service)
"owner/repository"
Git commit SHA or identifier
"abc123def456"
Authentication token for the service
"ghp_xxxxxxxxxxxx"
Version control service provider
github, azuredevops, gitlab, bitbucket "github"
Base URL for the service (optional for GitHub, required for GitLab)
"https://gitlab.com"
IaC scan results retrieved successfully
Infrastructure as Code (IaC) scanning response containing security check results
List of IaC scan results by check type
Show child attributes
Type of IaC framework checked
"terraform"
Check results for this framework
Show child attributes
List of failed security checks
Show child attributes
Bridgecrew check identifier
"BC_AWS_NETWORKING_31"
Checkov check identifier
"CKV_AWS_23"
Human-readable name of the security check
"Ensure every security group and rule has a description"
Path to the file with the issue
"/owner/repository/abc123def456/terraform/main.tf"
Line range where the issue occurs
[2, 25]Full class path of the check
"checkov.terraform.checks.resource.aws.SecurityGroupRuleDescription"
Code lines with line numbers
Array containing line number and line content
2 elements[
[
2,
"resource \"aws_security_group\" \"web\" {\n"
],
[3, " name_prefix = \"web-sg\"\n"]
]Resource identifier in IaC file
"aws_security_group.web"
Starting line number
2
Ending line number
25