CycloneDX / CycloneDX/cyclonedx-python
Feature request: Add native uv project support (pyproject.toml + uv.lock) via cyclonedx-py uv subcommand
- Ngôn ngữ chính
- Python
- Star
- 390
- Fork
- 98
- Merge trung bình
- 2 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 2
Mô tả
## Is your feature request related to a problem? Please describe.
Yes. `cyclonedx-py` currently supports generating SBOMs from environments, requirements, Pipenv, and Poetry projects, but there is no first-class `uv` project workflow in released versions.
This makes it harder for teams using `uv` to generate lockfile-based SBOMs directly from `pyproject.toml` + `uv.lock`, and can block adoption in projects where `uv` is the package manager of record.
## Describe the solution you'd like
Add native `uv` project support as a dedicated CLI subcommand (for example, `cyclonedx-py uv`) that:
- accepts a project directory (or `uv.lock` path),
- reads `pyproject.toml` and `uv.lock`,
- resolves dependency groups/extras in a way consistent with `uv`,
- generates CycloneDX JSON/XML output with the same quality and validation behavior as existing subcommands,
- is documented in `README` and `docs/usage.rst`,
- includes integration/unit tests and snapshot coverage.
## Describe alternatives you've considered
- **Environment scan (`cyclonedx-py environment`)**: works for installed packages, but is less lockfile-centric and can differ from the exact declared lock resolution.
- **Converting/exporting through external tools first**: adds extra steps and potential drift between source lock data and generated SBOM.
- **Maintaining custom scripts**: increases maintenance burden and reduces consistency with official tool behavior.
## Additional context
`uv` adoption is growing quickly, and users expect parity with other mainstream Python dependency workflows.
A dedicated `uv` subcommand would improve reproducibility, reduce friction in CI pipelines, and align with lockfile-driven supply chain practices.
## Contribution
- [x] I am willing to provide an implementation
- [ ] I will wait until somebody else implements it
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xem xét các subcommand hiện có của cyclonedx-py và pull request #1028 được liên kết, sau đó đọc README và docs/usage.rst để nắm các mẫu CLI đã được ghi lại. Công việc được coi là hoàn thành khi một workflow uv chuyên biệt chấp nhận pyproject.toml và uv.lock, tạo ra các đầu ra CycloneDX được yêu cầu, đồng thời có độ bao phủ unit, integration và snapshot theo yêu cầu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- cli, documentation, tooling
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100