Expand description
Verdict + ancillary response types per Client spec rev1 §2.4 + App Rev 4 §4.1 Vector verdict shape.
All fields default-tolerant via #[serde(default)] so the SDK can
consume partial responses during cycle-3 → cycle-N spec evolution
without forcing a recompile-and-redeploy on every App-side schema
widening.
Structs§
- Audit
Entry - One audit log entry returned from
GET /v1/audit. - Audit
Response - Response from
GET /v1/audit. Mirrors the App-sideAuditResponseincleanlib-app::verbs. SeeAuditEntryfor the CLEANLIB-366 field-name alignment note. - Audit
Window - Query-window echo returned inside
AuditResponse::window. Mirrors the App-sideAuditWindow— echoes the caller’ssince/untilfilter values verbatim (orNonewhen the filter was omitted). - Availability
Block - Cycle-15 honesty signal block on the SDK Verdict shape. Mirrors the App
wire-shape
cleanlib_core::AvailabilityBlock.Option<bool>-style passthrough fordegraded_staleso pre-cycle-15 payloads (without the block) deserialize cleanly. - Axes
- CLEANLIB-780: the per-axis result envelope (mirrors the App’s
axesonCustomerVerdictResponse). Each plane is reported SEPARATELY so the client renders honest per-axis language. Tolerant: struct-level#[serde(default)]+Default, nodeny_unknown_fields, so a partial or future-extended envelope never fails the reader. - Axis
Advisory - CLEANLIB-780 advisory (CVE cross-reference) axis.
resultis the App’s closed enumclean|vulnerable|never_consulted— DERIVED, never a false clean.sources_consultedlists ONLY sources proven to have contributed data and is ABSENT on a clean/empty result (the App does not fabricate a source list), so the client must render only the sources present and never a hardcoded set. - Axis
Availability - CLEANLIB-780 availability (byte-serve fingerprint) axis. Not evaluated on the
verdict path, so
ranis honestlyfalse— a scope statement, not a failure. - Axis
Threat - CLEANLIB-780 threat (behavioral / Vector triage) axis — the empirical split
from advisory.
resultismalicious|blocked|clean|never_consulted. CVE findings are the ADVISORY axis and are NOT counted here. - Coverage
- CLEANLIB-652 (CX-3) part 3b / CLEANLIB-647 (DD-1): the App’s per-request
coverageblock on thePOST /v1/scanresponse — how many coordinates were assessed vs not, plus the per-coordinate attribution the client required (652 c767287) so DD-1 can populateerroron each never-evaluated coordinate. - Finding
- CLEANLIB-613: one CVE finding inside
TopFindings. Only the fields the CLI consumes are typed; the App may add more (tolerated — nodeny_unknown_fields). - Freshness
- CLEANLIB-652 (CX-3) part 2: the App’s nested per-axis
freshnessblock (mirrorsverbs::Freshness). Each axis age isOption— under precedence composition only the producing axis carries a timestamp and the others are null;overall_as_of= MIN of the non-null axis ages (the verdict is only as fresh as its stalest input). All-optional +#[serde(default)]for tolerant, forward-compatible parsing. - NotAssessed
Reason - CLEANLIB-652 (CX-3) part 3b / CLEANLIB-647 (DD-1): one per-coordinate
not-assessed reason from the App’s per-request
coverageblock. The App emits this for every coordinate it returned but could NOT assess (seeCoverage::not_assessed_reasons); the client joins it into the per-decisionerrorfield soscan --output jsoncan distinguish a NEVER-EVALUATED coordinate from one that was evaluated and warned. - Package
Ref - One package identity for policy-preview / scan requests.
- Policy
Decision - Per-package decision returned from
/v1/policy/previewor embedded in audit entries. - Policy
Preview Request - Body of
POST /v1/policy/preview— packages + optional hypothetical policy override (JSON-shaped; YAML-source customers convert client-side). - Policy
Preview Response - Response from
POST /v1/policy/preview. - Previous
Verdict - Prior-verdict comparison. Surfaces when the CleanLibrary App has a
stored prior verdict for the same
(ecosystem, package, version)that differs from the current one — useful for AI agents and dashboards that want to flag verdict-state changes since the last fetch. Sister-shape withcleanlib_sdk_go::PreviousVerdictandcleanlib-core::PreviousVerdictin the App. - Remediation
- CLEANLIB-652 (CX-3) part 3a: structured remediation (mirrors App
verbs::Remediation) — the single upgrade target + a per-ecosystem copy-paste command.target_versionis engine-clean (the composite’s effective fix version). All-string +#[serde(default)]for tolerant, forward-compat parse. - Rich
Data - CLEANLIB-601: typed subset of the App’s
rich_datablock. Carries therecommended_versionupgrade target for the CLIfixcommand.#[serde(default)] - Scan
Request - Body of
POST /v1/scan— a batch of package coordinates, no policy. - Scan
Response - Response from
POST /v1/scan. OneScanResultper requested package. - Scan
Result - One entry of the
POST /v1/scanresponse. Mirrors the App’sverbs::ScanResultwire shape: the package coordinate is flattened (ecosystem/package/version) alongside an optionalverdict(present on success) orerrorstring (per-package partial failure — the App resolves each package independently and never fails the whole batch on one miss). - TopFindings
- CLEANLIB-613: the App’s
top_findingsblock on a customer verdict — the per-CVE findings that back a VECTOR_VERDICT/DENY, plus the KEV / ransomware flags. Modeled so the CLIfixcommand can reach each finding’s structuredfixed_version(the App’s always-populated remediation target). Tolerant:#[serde(default)], all-optional, nodeny_unknown_fields. - Verdict