feat(sbom): component creator from registries and purls (#508, part B2) #512

Merged
sharang merged 1 commits from feat/508-creator into main 2026-10-06 15:03:17 +00:00
Owner

Part B2 of #508: the component creator (BSI TR-03183-2), as the project's web page. The TR explicitly accepts "the project's web page".

What

  • SbomEntry.manufacturer_url: the homepage or repository URL. Only URLs are kept, never maintainer names or emails. The CycloneDX export writes it as components[].manufacturer.url.
  • Registry lookups return a license and a project URL (PackageFacts):
    • nuget.org: projectUrl;
    • npm: homepage, else repository, normalised to https (git+https, git@host:, github:o/r, o/r);
    • Maven: the POM's <url>, else <scm><url> (no ${…} properties).
  • When lookups run: for every package missing either value. That's more requests on first scans, within the existing per-scan bounds, the guarded client and the private-registry policies, as the user approved.
  • Cache: both values are cached for all tenants under their own keys (homepage:<key>). A cache row from before holds the license only, so that package is asked once more.
  • No-request URLs: GitHub/Bitbucket purls, and Go modules and Swift packages on a code host, get their repository page directly.
  • Validation: only http(s) URLs without credentials, at most 2048 characters.
  • Docs: the egress section (docs/reference/tools.md) now says registry metadata is also fetched for packages that already have a license. The SBOM guide is updated. Test plan check 30.

Result

sbomqs bsi-v2.1 on the test document: 7.22 C → 7.67 C. The component creator is met for every component but the product: the product is a logical component, and the workspace has no web address on record.

Tests

  • NuGet lookup tests are updated to the new contract: nuget.org is asked for the project URL even when a local .nuspec gave the license, and the cache holds two keys per package.
  • New unit tests for homepage, repository and POM parsing and the purl-derived pages.
  • 102 SBOM tests pass.
  • clippy -D warnings: core, agent, MCP.

Stage only; no tag.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

Part B2 of #508: the **component creator** (BSI TR-03183-2), as the project's web page. The TR explicitly accepts "the project's web page". ## What - **`SbomEntry.manufacturer_url`:** the homepage or repository URL. Only URLs are kept, never maintainer names or emails. The CycloneDX export writes it as `components[].manufacturer.url`. - **Registry lookups return a license *and* a project URL** (`PackageFacts`): - nuget.org: `projectUrl`; - npm: `homepage`, else `repository`, normalised to https (`git+https`, `git@host:`, `github:o/r`, `o/r`); - Maven: the POM's `<url>`, else `<scm><url>` (no `${…}` properties). - **When lookups run:** for every package missing either value. That's more requests on first scans, within the existing per-scan bounds, the guarded client and the private-registry policies, as the user approved. - **Cache:** both values are cached for all tenants under their own keys (`homepage:<key>`). A cache row from before holds the license only, so that package is asked once more. - **No-request URLs:** GitHub/Bitbucket purls, and Go modules and Swift packages on a code host, get their repository page directly. - **Validation:** only http(s) URLs without credentials, at most 2048 characters. - **Docs:** the egress section (`docs/reference/tools.md`) now says registry metadata is also fetched for packages that already have a license. The SBOM guide is updated. Test plan check 30. ## Result sbomqs bsi-v2.1 on the test document: 7.22 C → **7.67 C**. The component creator is met for every component but the product: the product is a logical component, and the workspace has no web address on record. ## Tests - NuGet lookup tests are updated to the new contract: nuget.org is asked for the project URL even when a local `.nuspec` gave the license, and the cache holds two keys per package. - New unit tests for homepage, repository and POM parsing and the purl-derived pages. - 102 SBOM tests pass. - clippy `-D warnings`: core, agent, MCP. Stage only; no tag. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-10-06 14:48:58 +00:00
feat(sbom): component creator from registries and purls (#508, part B2)
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 / Check (pull_request) Successful in 12m1s
9fa92c32d5
- SbomEntry gains manufacturer_url: the project's web page (homepage or
  repository), never a person. The CycloneDX export writes it as
  components[].manufacturer.url, BSI TR-03183-2's component creator.
- The nuget.org (projectUrl), npm (homepage, else repository) and Maven
  (<url>, else <scm><url>) lookups return a license and a project URL
  (PackageFacts) and run for every package missing either, within the same
  per-scan bounds and private-registry policies. Both are cached for all
  tenants under their own keys (homepage:<key>); a row from before holds the
  license only, so that package is asked once more.
- Repository references are normalised to https (git+https, git@,
  github:o/r, o/r); only http(s) URLs without credentials are kept.
- GitHub, Bitbucket, Go-module and Swift purls on a code host give their
  repository page without a request.
- sbomqs bsi-v2.1 on the test document: 7.22 C -> 7.67 C (the product, a
  logical component, has no creator URL).
- Docs: egress table and the SBOM guide; test plan check 30.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang merged commit 77d27646b8 into main 2026-10-06 15:03:17 +00:00
Sign in to join this conversation.