---
title: "Get the per-countermeasure coverage audit"
method: POST
path: "/api/v2/securityCompass/getMappingAudit"
tags: ["Security Compass"]
---

# Get the per-countermeasure coverage audit

`POST /api/v2/securityCompass/getMappingAudit`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/securityCompass/getMappingAudit`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Requires current repository visibility for the mapped repository; inaccessible mappings return 404. Read the per-countermeasure coverage breakdown recorded by the last successful sync: for each SD Elements task, whether ZeroPath covers it with built-in analysis ('sast'), an auto-generated natural-language rule ('nl_rule'), or not at all ('unsupported', with the catalog's reject reason when known). The audit is null before the first successful sync.

## Request body

- SecurityCompassGetMappingAuditRequest
  - `organizationId` string, required: Organization that owns the integration.
  - `mappingId` string, required: cuid of the project mapping whose audit to read.

## Response `200`

The mapping audit

- SecurityCompassMappingAuditResponse
  - `mappingId` string, required
  - `sdeProjectId` string, required
  - `repositoryName` string, required
  - `lastSyncAt` string, date-time, nullable, required: Completion time of the last successful sync; null before the first one.
  - `supportedCount` integer, required: Countermeasures ZeroPath covers (built-in analysis or generated rule).
  - `totalCount` integer, nullable, required: Total countermeasures in the audit; null before the first successful sync.
  - `audit` SecurityCompassEnrichedTaskAuditEntry[], nullable, required: Per-countermeasure coverage records; null before the first successful sync.
    - union: A task audit entry enriched with catalog metadata and the linked-issue count, as a discriminated union on `coverage`. `phase`/`priority`/`riskRating` are null for tasks with no catalog row. `linkedIssueCount` counts the issues currently tagged with this countermeasure by the findings push (0 until a scan completes after the mapping is synced). `rejectReason` is a string only for unsupported countermeasures that have a catalog row (e.g. a process/governance activity); it is null for supported entries and for tasks with no catalog row.
      - object
        - `taskId` string, required: SD Elements task (countermeasure) id.
        - `taskTitle` string, required: Countermeasure title from SD Elements.
        - `coverage` 'sast', required: Covered by ZeroPath's built-in analysis.
        - `rejectReason` unknown, required
        - `phase` string, nullable, required: SDLC phase from the global catalog; null for tasks with no catalog row.
        - `priority` integer, nullable, required: SD Elements priority (1-10) from the global catalog; null for tasks with no catalog row.
        - `riskRating` integer, nullable, required: Problem risk rating from the global catalog; null for tasks with no catalog row or when SD Elements leaves it unset.
        - `linkedIssueCount` integer, required: Issues currently tagged with this countermeasure by the findings push. 0 until a scan completes after the mapping is synced; drill down via securityCompass.getLinkedIssues.
      - object
        - `taskId` string, required: SD Elements task (countermeasure) id.
        - `taskTitle` string, required: Countermeasure title from SD Elements.
        - `coverage` 'nl_rule', required: Covered by an auto-generated natural-language rule.
        - `ruleName` string, required: Name of the generated natural-language rule.
        - `ruleId` string: cuid of the covering natural-language rule. Absent on audits written before mid-2026; present after the mapping next syncs.
        - `rejectReason` unknown, required
        - `phase` string, nullable, required: SDLC phase from the global catalog; null for tasks with no catalog row.
        - `priority` integer, nullable, required: SD Elements priority (1-10) from the global catalog; null for tasks with no catalog row.
        - `riskRating` integer, nullable, required: Problem risk rating from the global catalog; null for tasks with no catalog row or when SD Elements leaves it unset.
        - `linkedIssueCount` integer, required: Issues currently tagged with this countermeasure by the findings push. 0 until a scan completes after the mapping is synced; drill down via securityCompass.getLinkedIssues.
      - object
        - `taskId` string, required: SD Elements task (countermeasure) id.
        - `taskTitle` string, required: Countermeasure title from SD Elements.
        - `coverage` 'unsupported', required: Not verifiable through code scanning.
        - `rejectReason` string, nullable, required: Why this countermeasure was skipped, from the global catalog. Null for tasks with no catalog row (e.g. custom or not-yet-scraped tasks).
        - `phase` string, nullable, required: SDLC phase from the global catalog; null for tasks with no catalog row.
        - `priority` integer, nullable, required: SD Elements priority (1-10) from the global catalog; null for tasks with no catalog row.
        - `riskRating` integer, nullable, required: Problem risk rating from the global catalog; null for tasks with no catalog row or when SD Elements leaves it unset.
        - `linkedIssueCount` integer, required: Issues currently tagged with this countermeasure by the findings push. 0 until a scan completes after the mapping is synced; drill down via securityCompass.getLinkedIssues.

## Other responses

- `400`: Error Response
- `401`: Error Response
- `404`: Error Response
- `409`: Error Response

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
