Skip to content

Add CycloneDX output format - #222

Merged
bingenito merged 1 commit into
morganstanley:mainfrom
bingenito:cyclonedx-output-format
Nov 8, 2026
Merged

bingenito merged 1 commit into
morganstanley:mainfrom
bingenito:cyclonedx-output-format

Conversation

@bingenito

Copy link
Copy Markdown
Member

Detected URLs can now be written out as a CycloneDX 1.5 bill of materials.

The reason this tool exists is that a list of external URL dependencies is a gap in the usual SBOM and dependency manifest formats. A URL on its own does not carry a version or a license, so a full SBOM is not always possible, but there is still a useful manifest to produce. This adds cyclonedx as an output format alongside table, json, and csv.

Each unique URL becomes a single component. Every place it was found in the scanned files is recorded in a url-detector:locations property, and the URL is also exposed as a distribution external reference. The BOM records only what is actually known about a URL, which is the intended shape for a URL only manifest.

Usage:

url-detector --scan 'src/**' --format cyclonedx --output bom.json

The output has been validated against the official CycloneDX 1.5 JSON schema.

A URL list is hard to represent in the usual SBOM and dependency manifest formats, and that was the original reason this tool exists. This adds a cyclonedx output format so detected URLs can be written out as a CycloneDX 1.5 bill of materials.

Each unique URL becomes a single component. Every place it was found is recorded in a url-detector:locations property, and the URL is also exposed as a distribution external reference. Since a URL on its own does not carry a version or a license, the BOM only records what is actually known about it.

The output is validated against the official CycloneDX 1.5 JSON schema.
@bingenito
bingenito requested a review from a team as a code owner November 8, 2026 13:18
@codecov

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.78%. Comparing base (ae0fbc4) to head (f52a28f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #222      +/-   ##
==========================================
+ Coverage   80.40%   80.78%   +0.38%     
==========================================
  Files          10       10              
  Lines         597      609      +12     
  Branches      143      144       +1     
==========================================
+ Hits          480      492      +12     
  Misses         66       66              
  Partials       51       51              
Flag Coverage Δ
unittests 80.78% <100.00%> (+0.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bingenito
bingenito merged commit 26976dd into morganstanley:main Nov 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant