POST /api/v1/supplier-sboms/check (multipart file): reads the file the same way an upload of kind supplier_sbom does, and stores nothing.
Returns {format, components, statements}, for example CycloneDX 1.5, 212 components and 9 statements.
On a refusal it returns {error, code}. The code is one of unknown_format, malformed, empty, too_many_components or too_large, so the dashboard can word the refusal in German or English.
The route has its own body limit (20 MiB plus multipart overhead). A JSON route keeps 2 MiB.
The upload now keeps those three numbers with the artifact (detected: sbom_format, sbom_components, sbom_statements). It also sets ingested_at for every upload, which nothing set before. The target editor shows "CycloneDX 1.5 · 212 Komponenten · 9 Aussagen · hochgeladen am …".
One verdict: upload refusals carry the same code, and check and upload share SupplierSbomSummary::of.
The parser reports the declared format and version: the CycloneDX JSON specVersion, the XML namespace version, or the SPDX spdxVersion. It no longer has the unused read/parse wrappers.
Docs:docs/guide/sbom.md covers the check.
Tests
Unit: the format labels, and code().
Integration (--test e2e):
the check accepts a good SBOM, refuses a CSV and an empty SBOM with their codes, and accepts a 3 MiB SBOM above the 2 MiB JSON limit;
an upload keeps the facts and ingested_at;
an upload refusal carries the code.
Local runs:cargo test -p compliance-agent all green; clippy --all-targets -D warnings clean.
Next: the supplier advisory status for the editor, then the dashboard.
Part of #1025 (phase 1 of epic #1029). It's the first of three PRs for the approved supplier mockup (https://claude.ai/artifact/KN3xqurmCJd9QXziKQB3Qc).
## What
- **`POST /api/v1/supplier-sboms/check`** (multipart `file`): reads the file the same way an upload of kind `supplier_sbom` does, and stores nothing.
- Returns `{format, components, statements}`, for example `CycloneDX 1.5`, 212 components and 9 statements.
- On a refusal it returns `{error, code}`. The code is one of `unknown_format`, `malformed`, `empty`, `too_many_components` or `too_large`, so the dashboard can word the refusal in German or English.
- The route has its own body limit (20 MiB plus multipart overhead). A JSON route keeps 2 MiB.
- **The upload** now keeps those three numbers with the artifact (`detected`: `sbom_format`, `sbom_components`, `sbom_statements`). It also sets `ingested_at` for every upload, which nothing set before. The target editor shows "CycloneDX 1.5 · 212 Komponenten · 9 Aussagen · hochgeladen am …".
- **One verdict:** upload refusals carry the same `code`, and check and upload share `SupplierSbomSummary::of`.
- **The parser** reports the declared format and version: the CycloneDX JSON `specVersion`, the XML namespace version, or the SPDX `spdxVersion`. It no longer has the unused `read`/`parse` wrappers.
- **Docs:** `docs/guide/sbom.md` covers the check.
## Tests
- **Unit:** the format labels, and `code()`.
- **Integration (`--test e2e`):**
- the check accepts a good SBOM, refuses a CSV and an empty SBOM with their codes, and accepts a 3 MiB SBOM above the 2 MiB JSON limit;
- an upload keeps the facts and `ingested_at`;
- an upload refusal carries the code.
- **Local runs:** `cargo test -p compliance-agent` all green; clippy `--all-targets -D warnings` clean.
Next: the supplier advisory status for the editor, then the dashboard.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
The wizard stages files before the target exists, so it could only show
a refused supplier SBOM after creating the target. POST
/api/v1/supplier-sboms/check reads the file as an upload would, stores
nothing, and returns its format, components and supplier statements, or
the refusal with a code for the dashboard to word in German or English.
An upload keeps the same three numbers with the artifact (as detected
facts) and records when the file arrived (ingested_at), for the target
editor. The check has its own 20 MiB body limit, not the 2 MiB of a JSON
route.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #1025 (phase 1 of epic #1029). It's the first of three PRs for the approved supplier mockup (https://claude.ai/artifact/KN3xqurmCJd9QXziKQB3Qc).
What
POST /api/v1/supplier-sboms/check(multipartfile): reads the file the same way an upload of kindsupplier_sbomdoes, and stores nothing.{format, components, statements}, for exampleCycloneDX 1.5, 212 components and 9 statements.{error, code}. The code is one ofunknown_format,malformed,empty,too_many_componentsortoo_large, so the dashboard can word the refusal in German or English.detected:sbom_format,sbom_components,sbom_statements). It also setsingested_atfor every upload, which nothing set before. The target editor shows "CycloneDX 1.5 · 212 Komponenten · 9 Aussagen · hochgeladen am …".code, and check and upload shareSupplierSbomSummary::of.specVersion, the XML namespace version, or the SPDXspdxVersion. It no longer has the unusedread/parsewrappers.docs/guide/sbom.mdcovers the check.Tests
code().--test e2e):ingested_at;cargo test -p compliance-agentall green; clippy--all-targets -D warningsclean.Next: the supplier advisory status for the editor, then the dashboard.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9