feat(releases): release a target to a connected workspace and publish versions (#1028)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 5m56s
CI / Check (pull_request) Successful in 21m53s

The supplier's side of phase 4, step 4 of the plan on #1028:

- `POST /api/v1/targets/{id}/releases` releases a target over one of the
  workspace's active connections (#1062), once per connection at a time
  (409 `released`); an unknown or inactive connection is 422
  (`unknown_connection`); `…/releases/{release}/end` ends it (idempotent);
- `POST /api/v1/targets/{id}/versions` publishes a version: the target's
  components now as the stripped CycloneDX (`released_cyclonedx`, #1049),
  the workspace's display name as supplier and the label as version; labels
  are unique per target (409), a target without components is 422; the
  document is kept in the target's upload folder with its SHA-256, so an
  unchanged version is never delivered twice;
- `GET …/versions/preview?label=` builds it without storing it;
- `GET /api/v1/targets/{id}/releases` lists releases (active first) and
  versions;
- releasing, ending and publishing are audited; deleting a target deletes
  its releases and versions (their files with its upload folder).

Delivering versions to the customers who accept comes with the customer
side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
This commit is contained in:
Sharang ParnerkarandClaude Opus 5.5 committed 2026-11-19 13:12:04 +01:00
1 parent fb8223bc11
commit b84c6d329e
8 files changed
+950 -1

No files matched your search

+29
View File
@@ -192,6 +192,35 @@ form, and it is stored only when you save it as your own statement.
but it is not your statement: it settles no alert, closes no issue and is
not exported as yours. Your own VEX status stays yours to state.
### Releasing an SBOM to a connected workspace
A supplier that uses Breakpilot itself can release the SBOM of one of its
targets to a customer's workspace once the two are connected (in the portal,
by code). This is the supplier's side; offering and delivering to the
customer follow.
- `GET /api/v1/connections` lists your active connections, each by its id and
the other workspace's name. Nothing else of the other workspace is shown.
- `POST /api/v1/targets/{id}/releases` with `{"connection_id"}` releases the
target over a connection. It is released once per connection at a time
(`409` `released`). A connection that is not active answers `422`
(`unknown_connection`).
- `POST …/releases/{release}/end` ends a release. What the customer already
received stays with them.
- `POST /api/v1/targets/{id}/versions` with `{"label"}` publishes a version.
It is built from the target's components at that moment, as a CycloneDX
document with what identifies each component, its licences and its hashes.
Your workspace is named as the supplier and the label as the version. No
vulnerabilities, findings, paths or internal ids are included. Labels are
unique per target (`409` `label_taken`). A target without components
answers `422` (`empty`).
- `GET …/versions/preview?label=…` returns that document without publishing
it.
- `GET /api/v1/targets/{id}/releases` lists the releases (active ones first)
and the published versions.
Releasing, ending and publishing are recorded in your workspace's audit log.
### When the SBOM is empty or incomplete
An SBOM without components does not mean the software uses no libraries: