3.3 KiB
3.3 KiB
Console Search and Downloads
This document defines deterministic ranking, caching rules, and the download manifest shape used by Console search and export-style workflows.
1) Deterministic search ranking
- Primary sort:
severity (desc)thenexploitScore (desc)thenreachability (reachable > unknown > unreachable)thenpolicyBadge (fail > warn > pass > waived)thenvexState (under_investigation > fixed > not_affected > unknown)thenfindingId (asc). - Secondary tie-breakers (when primary fields are absent):
advisoryId (asc)thenproduct (asc). - Pages are pre-sorted server-side; clients MUST NOT re-order results.
2) Caching and freshness
- Response headers (recommended defaults):
Cache-Control: private, max-age=300, stale-while-revalidate=60, stale-if-error=300. ETagSHOULD be a stable SHA-256 over a canonicalized, sorted payload so identical inputs produce identical validators; clients sendIf-None-Matchfor revalidation.Last-ModifiedSHOULD reflect the newestupdatedAtpresent in the result set.- Retry/backoff: honor
Retry-Afterwhen present; otherwise use deterministic client backoff (for example1s, 2s, 4s, 8scapped at 30s). - Page cursors: opaque base64url, signed; bind to
tenantand effective sort keys to avoid cross-tenant or cross-sort reuse.
3) Download manifest
When a Console workflow produces downloadable artifacts (individual documents or a bundle), services can return a manifest describing:
- What items are available,
- Where to download them (signed URLs or gateway-relative links),
- How to verify them offline (checksums and optional signature metadata).
Top-level fields:
version(string): manifest schema/version label used by the producer.exportId(string): stable export identifier (content-addressable or run-id style).tenantId(string): tenant scope for this export.generatedAt(RFC 3339 / ISO-8601 UTC): generation timestamp.items[](array): downloadable artifacts.checksums(object): checksum(s) for the manifest itself and optional bundle artifact.expiresAt(RFC 3339 / ISO-8601 UTC): optional expiry for signed URLs.
Item fields:
type(string): artifact type (for examplevuln,vex,policy,scan,bundle).id(string): stable identifier within the type (CVE id, statement id, export id, etc).format(string):json,ndjson,tar.gz, etc.url(string): download URL (often signed).sha256(string): lowercase hex digest of the bytes aturl.size(int): byte size.
Signed metadata (optional)
Producers MAY ship a DSSE envelope for the manifest checksum:
- Payload type:
stellaops.console.manifest - Media type:
application/json - Distribution: alongside the manifest (for example
manifest.dsse) or via a link relation (for examplerel=\"alternate\"withtype=\"application/dsse+json\").
4) Error handling
Known error codes for download/manifest flows:
ERR_CONSOLE_DOWNLOAD_INVALID_CURSORERR_CONSOLE_DOWNLOAD_EXPIREDERR_CONSOLE_DOWNLOAD_RATE_LIMITERR_CONSOLE_DOWNLOAD_UNAVAILABLE
On error, return the standard error envelope with deterministic fields (stable code/message, plus request/trace identifiers).
5) Samples and fixtures
- Download manifest example:
docs/api/console/samples/console-download-manifest.json