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

# Get Secrets Scan Results

`POST /api/analysis/results/secrets`

Retrieves the secrets scanning results for a specific repository and commit

## Request body

- SecretsRequest
  - `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`

Secrets scan results retrieved successfully

- SecretsResponse — Secrets scanning response containing detected secrets and sensitive information
  - `results` object — Secrets scanning results
    - `secrets` object[] — List of secrets detected
      - `type` string — Type of secret detected
      - `filename` string — Full file path where secret was found
      - `hashed_secret` string — SHA-1 hash of the detected secret
      - `is_verified` boolean — Whether the secret has been verified
      - `line_number` integer — Line number where secret was found
      - `confidence_score` 'TRUE_POSITIVE' | 'FALSE_POSITIVE' | 'UNKNOWN' — Confidence level of the detection
    - `secretsCount` integer — Total number of secrets found
  - `status` 'pending' | 'processing' | 'done' | 'failed' — Status of the secrets scan
  - `commit_id` string — Git commit SHA that was analyzed

## 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)
