Part B1 of #508: the hash of each component's deployable file, and its download URL. BSI TR-03183-2 requires both (the hash as SHA-512). B2 (maintainer URLs) follows.
What
SbomEntry gains hashes (CycloneDX alg + lowercase hex) and download_url. Both are optional in storage, so existing rows decode unchanged.
CycloneDX export:
the component carries hashes;
with a URL, it also gets an externalReferences entry of type distribution carrying the URL and the hashes. That's where the TR and sbomqs look.
syft: the same run also writes -o syft-json=<tmp>. Syft's own format keeps the lockfile metadata that its CycloneDX output drops:
Lockfile
Hash
URL
package-lock.json, yarn.lock
integrity (SRI)
resolved (yarn's #sha1 fragment stripped)
pnpm-lock.yaml
resolution.integrity
resolution.tarball, else npmjs
packages.lock.json
contentHash (SHA-512 of the .nupkg)
nuget.org flat container
Cargo.lock
checksum (SHA-256)
static.crates.io, if the source is the crates.io index
Derived URLs (npmjs, nuget.org) are used only when the project takes the package from the public registry. This reuses the private-registry policies of the licence lookups: .npmrc/.yarnrc.yml scopes, and nuget.config sources with package source mapping. A private package keeps its hash but gets no URL.
Result
sbomqs bsi-v2.1 on the test document: 6.67 D → 7.22 C. The deployable hash is met for npm/NuGet; the download URI also for Cargo.
Still open, documented in docs/guide/sbom.md:
Cargo's SHA-256, which the TR rejects;
Python and Maven (no lockfile hash read yet);
committed binaries, which are inventory findings, not SBOM components;
the component creator (B2);
the concluded licence (by decision).
Tests
distribution unit tests: all four lockfile shapes, private-registry cases, and SRI/URL edge cases.
Schema validation with hashes and the distribution reference.
The #[ignore] sbomqs test now asserts the hash and URL scores.
The real syft two-output invocation, checked by hand.
101 SBOM module tests pass.
clippy -D warnings: core, agent, MCP, dashboard.
Test plan check 28 (renumbered on merge), marked [visible]. Stage only; no tag.
Part B1 of #508: the hash of each component's deployable file, and its download URL. BSI TR-03183-2 requires both (the hash as SHA-512). B2 (maintainer URLs) follows.
## What
- **`SbomEntry`** gains `hashes` (CycloneDX alg + lowercase hex) and `download_url`. Both are optional in storage, so existing rows decode unchanged.
- **CycloneDX export:**
- the component carries `hashes`;
- with a URL, it also gets an `externalReferences` entry of type `distribution` carrying the URL and the hashes. That's where the TR and sbomqs look.
- **syft:** the same run also writes `-o syft-json=<tmp>`. Syft's own format keeps the lockfile metadata that its CycloneDX output drops:
| Lockfile | Hash | URL |
|---|---|---|
| `package-lock.json`, `yarn.lock` | `integrity` (SRI) | `resolved` (yarn's `#sha1` fragment stripped) |
| `pnpm-lock.yaml` | `resolution.integrity` | `resolution.tarball`, else npmjs |
| `packages.lock.json` | `contentHash` (SHA-512 of the `.nupkg`) | nuget.org flat container |
| `Cargo.lock` | `checksum` (SHA-256) | static.crates.io, if the source is the crates.io index |
- **Derived URLs** (npmjs, nuget.org) are used only when the project takes the package from the public registry. This reuses the private-registry policies of the licence lookups: `.npmrc`/`.yarnrc.yml` scopes, and `nuget.config` sources with package source mapping. A private package keeps its hash but gets no URL.
## Result
sbomqs bsi-v2.1 on the test document: 6.67 D → **7.22 C**. The deployable hash is met for npm/NuGet; the download URI also for Cargo.
**Still open, documented in `docs/guide/sbom.md`:**
- Cargo's SHA-256, which the TR rejects;
- Python and Maven (no lockfile hash read yet);
- committed binaries, which are inventory findings, not SBOM components;
- the component creator (B2);
- the concluded licence (by decision).
## Tests
- `distribution` unit tests: all four lockfile shapes, private-registry cases, and SRI/URL edge cases.
- Schema validation with hashes and the distribution reference.
- The `#[ignore]` sbomqs test now asserts the hash and URL scores.
- The real syft two-output invocation, checked by hand.
- 101 SBOM module tests pass.
- clippy `-D warnings`: core, agent, MCP, dashboard.
Test plan check 28 (renumbered on merge), marked [visible]. Stage only; no tag.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
- SbomEntry gains hashes (alg + hex) and download_url, both optional in
storage. The CycloneDX export lists the hashes on the component and, with
a download URL, as an externalReferences "distribution" entry: BSI
TR-03183-2's hash of the deployable component and its URI.
- One syft run now also writes its own JSON format, which keeps what the
lockfiles say about each package's file: npm/yarn integrity + resolved,
pnpm resolution.integrity (+ tarball), NuGet packages.lock.json
contentHash (SHA-512 of the .nupkg), Cargo checksum (SHA-256).
- A URL the lockfile does not name is the public registry's (npmjs,
nuget.org flat container, static.crates.io), only when the project takes
the package from there: the npm and NuGet registry policies of the licence
lookups decide.
- sbomqs bsi-v2.1 on the test document: 6.67 D -> 7.22 C (deployable hash
met for npm/NuGet).
- Docs: what the export carries and what stays open. Test plan check 29.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
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 B1 of #508: the hash of each component's deployable file, and its download URL. BSI TR-03183-2 requires both (the hash as SHA-512). B2 (maintainer URLs) follows.
What
SbomEntrygainshashes(CycloneDX alg + lowercase hex) anddownload_url. Both are optional in storage, so existing rows decode unchanged.CycloneDX export:
hashes;externalReferencesentry of typedistributioncarrying the URL and the hashes. That's where the TR and sbomqs look.syft: the same run also writes
-o syft-json=<tmp>. Syft's own format keeps the lockfile metadata that its CycloneDX output drops:package-lock.json,yarn.lockintegrity(SRI)resolved(yarn's#sha1fragment stripped)pnpm-lock.yamlresolution.integrityresolution.tarball, else npmjspackages.lock.jsoncontentHash(SHA-512 of the.nupkg)Cargo.lockchecksum(SHA-256)Derived URLs (npmjs, nuget.org) are used only when the project takes the package from the public registry. This reuses the private-registry policies of the licence lookups:
.npmrc/.yarnrc.ymlscopes, andnuget.configsources with package source mapping. A private package keeps its hash but gets no URL.Result
sbomqs bsi-v2.1 on the test document: 6.67 D → 7.22 C. The deployable hash is met for npm/NuGet; the download URI also for Cargo.
Still open, documented in
docs/guide/sbom.md:Tests
distributionunit tests: all four lockfile shapes, private-registry cases, and SRI/URL edge cases.#[ignore]sbomqs test now asserts the hash and URL scores.-D warnings: core, agent, MCP, dashboard.Test plan check 28 (renumbered on merge), marked [visible]. Stage only; no tag.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
a78f1e3d5atoa1af4b0ffe