Skip to main content
GET
Project posture rollup for the Audit landing

Authorizations

Authorization
string
header
required

An Earnie API key, sent as Authorization: Bearer sk_earnie_.... Create one under Settings > API keys. The key's scopes decide which operations it may call.

Path Parameters

projectId
string<uuid>
required

Response

Project posture rollup.

Project-scoped posture rollup for the Audit landing. Computed from the project's posture SOURCE scan over scans.* tables: the latest completed successful full-coverage scan from the default branch only. Partial and non-default-branch scans never publish project posture; the last confirmed default-branch result remains visible while a newer head is running or cancelled. Returns 404 (project_no_completed_scan) when the project has no completed scan at all yet (the landing shows its empty/first-run state instead).

Most metrics read scans.* only. triage_progress is the one findings-store-sourced field and is therefore nullable, as this schema anticipated.

The crypto rollup is not part of this response: it reads every active crypto finding, so it is served by GET /v1/scans/projects/{projectId}/summary/crypto and the rest of the posture never waits on it.

project_id
string<uuid>
required
source_scan_id
string<uuid>
required

The scan id this posture was computed from (links to run detail).

components_total
integer
required

Count of distinct components in the project's inventory — fingerprint matched UNION declared in a manifest, PLUS dependency-sourced crypto purls with no component row behind them.

Granularity is the BASE purl (version, qualifiers and subpath stripped) for the crypto arm, matching how scans.components stores an identity, so pkg:maven/a/b@1.0, pkg:maven/a/b@2.0?type=jar and pkg:maven/a/b@2.0#src/main are one component here.

The crypto arm admits source: dependency evidence only. Direct crypto evidence may carry a purl too — the library whose API first-party code calls — but that is a usage attribution, not an inventory entry, and counting it inflated this against every other surface reporting the same inventory.

match_coverage
object
required

File-level OSS coverage statistics for the scan. oss_pct + original_pct = 100 (integer arithmetic, rounded).

license_distribution
object[]
required

Distinct SPDX ids + occurrence counts, ordered by count DESC.

licenses_total
integer
required

Number of distinct SPDX ids across the source scan's components.

components_without_license
integer
required

Components in the matched ∪ declared inventory with NO SPDX id linked at all — the "carries no license assertion" population.

Counted server-side over the whole inventory rather than derived client-side from matched_components, which is capped at 100: a client-side count silently becomes a floor on any inventory larger than the cap, and presents it as a total.

vuln_by_severity
object
required

Count of distinct CVE ids per severity level across the scan's components.

exploitability
object
required

Distinct-CVE counts for the exploitability signals the Dashboard headlines, aggregated over the same matched ∪ declared component inventory as vuln_by_severity.

Each count is over DISTINCT cve_id, so one CVE affecting five components counts once. The three buckets OVERLAP by construction — a KEV entry associated with ransomware and carrying a high EPSS score appears in all three — so they must never be summed into a total.

kev_cve_count and ransomware_cve_count are resolved against the CISA Known Exploited Vulnerabilities catalog at request time. They report 0 when the KEV catalog is unavailable to the rollup, which is indistinguishable from a genuine zero.

dependency_count
integer
required

Total distinct declared dependency purls (scans.dependencies. dep_purl) for the source scan — the same scan that scopes the declared half of the component inventory. Populated; 0 means the project declared no dependencies, or the count could not be read.

matched_components
object[]
required

Top components ordered by file_count DESC, capped at 100 entries.

last_updated_at
string<date-time>
required

finished_at of the source scan (the "last measured" provenance timestamp).

provenance_label
string
required

Human label, e.g. "Upload audit", "Repository scan".

source_coverage
enum<string>
required

Coverage of the source scan. full means this rollup reflects a code-matched (snippet-level) scan. partial means the project has no completed full-coverage scan yet and this rollup was derived from a partial-coverage scan instead — e.g. an imported SBOM — so it reflects declared components only, with no code-level matching. Clients use this to render an accurate banner rather than presenting the two identically.

Available options:
full,
partial
triage_progress
object | null

Decided-vs-total findings for the project. null when the findings store is not reachable from this rollup — see TriageProgress.

ai
object

AI provenance rollup. OPTIONAL, and its presence is the not-scanned discriminator, exactly as for crypto: ABSENT means the ai scanner has never run to completion for this project AND the project holds no present AI findings (or the caller cannot see ai, or the findings store was unreachable); PRESENT with all-zero counts means scanned and clean. Clients must never read zero counts as "not scanned" nor absence as "clean".

Presence is the UNION of the posture source scan having completed the ai stage and the project still holding present AI findings; when only the second half holds, last_ai_scan_at says how fresh the numbers are.

last_ai_scan_at
string<date-time> | null

finished_at of the project's most recent COMPLETED scan that ran the ai stage to completion, or null when no scan of this project ever did. Project-scoped, like last_crypto_scan_at: null while ai is PRESENT means the section is rendering findings that outlived the scan that produced them.

origin_split
object

How the inventory was established — code matching, manifest declaration, or both. OPTIONAL, and absence is meaningful in exactly one way: it is ABSENT when source_coverage is partial, because a scan that never code-matched cannot report a code-match share. That is not "0 code-matched"; it is "the question was never asked", and clients render it as such (—), never as a zero.

PRESENT with code_match_only: 0 and both: 0 IS a real zero — a full scan that matched no files.