Eine HTTPS-API, aufgerufen mit curl aus jeder Pipeline. Nichts zu installieren, nichts zu betreiben: Die CI-Anbindung ist diese API und ein Beispiel zum Kopieren (ADR-0017).
BitHive Reporting Desk API · 0.4.1
Authentifizierung
Jede Anfrage trägt ein API-Token als Bearer-Token: „Authorization: Bearer <token>“. Token werden in der Anwendung erstellt, tragen Scopes, können auf ein Produkt begrenzt werden und laufen ab. Ein unbekanntes, abgelaufenes oder widerrufenes Token wird mit 401 und einem Problemdokument beantwortet.
Server
https://app.bithive-it.comProduction
http://localhost:8080Local development
Endpunkte
GET/healthz
Liveness probe
Reports that the process is running. Checks no dependencies.
Reports whether all dependencies can serve traffic, as a status and nothing
else: no dependency is named, and no version or error text is returned. The
external uptime monitor polls it. Failure details are logged.
Returns the products the token may see: all products of the account, or
only the one the token is limited to. Archived products are included and
marked.
Stores a CycloneDX or SPDX document in JSON, at most 10 MiB, and indexes
its components. The format is read from the document, not from the
content type. Uploading the same bytes for the same product again answers
200 with the existing upload instead of storing a second one, so a build
pipeline that runs twice on an unchanged tree is harmless.
Requires the scope sboms:write.
Parameter
productIdpath, string (uuid), erforderlich Identifier of the product.
Anfragekörper
The document itself, as sent by the build tool.
application/json
application/vnd.cyclonedx+json
application/spdx+json
Antworten
200 The same document was already stored for this product; nothing changed.SBOM
Returns the upload. An upload of another account, and one belonging to a
product the token is not limited to, are reported as not found. Requires
the scope sboms:read.
Parameter
sbomIdpath, string (uuid), erforderlich Identifier of the upload.
Returns every component the document listed, by name. The list is
complete and needs no paging: a document may not carry more than 50,000
components. Requires the scope sboms:read.
Parameter
sbomIdpath, string (uuid), erforderlich Identifier of the upload.
Returns the product's findings, the ones for vulnerabilities known to be
exploited first, then by severity, then newest. That order is the order to
work in: an actively exploited vulnerability is what starts the Cyber
Resilience Act's 24-hour report.
Whether a vulnerability is exploited is resolved when the request is
answered, not stored on the finding, because a vulnerability becomes
exploited later and that moment is what matters.
Requires the scope findings:read.
Parameter
productIdpath, string (uuid), erforderlich Identifier of the product.
Returns how many components of the product's latest upload we can check,
and names what it cannot. Results depend on the completeness of the bill of
materials, so the uncovered part is named rather than merely subtracted: a
client can see which ecosystems are not covered and why.
A component is not monitored when it carries no package identifier (common
in firmware built with Yocto or Buildroot), when it names no version, or
when it belongs to an ecosystem whose matching is not yet proven.
Requires the scope findings:read.
Parameter
productIdpath, string (uuid), erforderlich Identifier of the product.
Antworten
200 What the product's latest upload could be checked against.Coverage
401 The API token is missing, unknown, expired or revoked.
403 The API token does not carry the required scope.
404 The resource does not exist, or the token may not see it.
Version of the specification the document follows, for example 1.6 or SPDX-2.3.
sha256 erforderlich
string
SHA-256 of the stored document, in lower-case hexadecimal. It addresses the document.
component_count erforderlich
integer
Components the document listed, after repetitions were dropped.
source erforderlich
string
Whether the upload came through the interface or this API.
created_at erforderlich
string (date-time)
SBOMList
Field
Type
Description
sboms erforderlich
array of object
Component
Field
Type
Description
name erforderlich
string
version erforderlich
string
Empty when the document stated no version; such a component cannot be matched.
purl erforderlich
string
Package URL as the document carried it, empty when it carried none.
ComponentList
Field
Type
Description
components erforderlich
array of object
total erforderlich
integer
Finding
Field
Type
Description
id erforderlich
string (uuid)
component erforderlich
object
vulnerability erforderlich
object
evidence erforderlich
string
Whether the feed stated the affected version outright, or the version was compared against a published range.
matched_range
string
The range that decided a compared match.
state erforderlich
string
exploited erforderlich
boolean
The vulnerability is known to be exploited, which starts the 24-hour report.
exploited_cve
string
The identifier the exploitation catalogue lists it under.
exploited_since
string (date)
The day the catalogue added it.
ransomware erforderlich
boolean
The catalogue has linked it to a ransomware campaign.
first_seen_at erforderlich
string (date-time)
When the Reporting Desk first saw this finding. Reporting deadlines are measured from our own knowledge.
last_seen_at erforderlich
string (date-time)
FindingList
Field
Type
Description
findings erforderlich
array of object
total erforderlich
integer
exploited erforderlich
integer
How many of them start a reporting deadline.
NotMonitoredGroup
Field
Type
Description
reason erforderlich
string
ecosystem
string
The ecosystem, when the reason is about one, so a client can see that it is Alpine rather than only that something is unsupported.
explanation
string
What specifically is unsolved. For "version could not be read": these versions
cannot be ordered, so they are not checked against advisories that give a range of
affected versions; they are still matched against advisories that list their exact
version, which means such a component can have findings and still be counted here
as not monitored.
components erforderlich
integer
Coverage
Field
Type
Description
sbom_id
string (uuid)
The upload this describes; absent when the product has none.
components erforderlich
integer
monitored erforderlich
integer
monitored_percent erforderlich
number
The monitored share, rounded to one decimal place.
not_monitored erforderlich
array of object
Problem
RFC 9457 problem details.
Field
Type
Description
type erforderlich
string
title erforderlich
string
status erforderlich
integer
detail
string
Der Vertrag selbst. Diese Seite entsteht aus dem OpenAPI-Dokument des Dienstes. Es ist als Datei veröffentlicht, damit ein Client-Generator denselben Vertrag lesen kann, den diese Seite beschreibt. openapi.yaml herunterladen