---
title: "Get IaC Scan Results"
method: POST
path: "/api/analysis/results/iac"
tags: ["Analysis"]
---

# Get IaC Scan Results

`POST /api/analysis/results/iac`

Retrieves Infrastructure as Code (IaC) security scanning results for a specific repository and commit

## Request body

- IaCRequest
  - `repo` string, required — Repository identifier (format varies by service)
  - `commit_id` string — Git commit SHA or identifier. Either commit_id or branch is required. If both are provided, commit_id takes precedence.
  - `branch` string — Git branch name. When provided without commit_id, the service resolves the latest commit from scan history for this branch. Either commit_id or branch is required.
  - `access_token` string, required — Authentication token for the service
  - `service` 'github' | 'azuredevops' | 'gitlab' | 'bitbucket', required — Version control service provider
  - `gitlab_base_url` string — Base URL for the service (optional for GitHub, required for GitLab)

## Response `200`

IaC scan results retrieved successfully

- IaCResponse — Infrastructure as Code (IaC) scanning response containing security check results
  - `results` object[] — List of IaC scan results by check type
    - `check_type` string — Type of IaC framework checked
    - `results` object — Check results for this framework
      - `failed_checks` object[] — List of failed security checks
        - `bc_check_id` string — Bridgecrew check identifier
        - `check_id` string — Checkov check identifier
        - `check_name` string — Human-readable name of the security check
        - `file_path` string — Path to the file with the issue
        - `file_line_range` integer[] — Line range where the issue occurs
        - `check_class` string — Full class path of the check
        - `code_block` array[] — Code lines with line numbers
          - unknown[] — Array containing line number and line content
            - unknown
        - `resource` string — Resource identifier in IaC file
        - `start_line` integer — Starting line number
        - `end_line` integer — Ending line number

## Other responses

- `401` — Invalid access token
- `500` — Internal server error

---

[API](https://skmtc.dev/codeant/apis/codeant-ai-api.md) · [All operations](https://skmtc.dev/codeant/apis/codeant-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/codeant/codeant-ai-api/revisions/d1eb7c083a39/schema)
