CycloneDX / CycloneDX/cyclonedx-python

feat: mark dev-dependencies `component.scope` as "excluded"

Đang mở
#675 0 bình luận 2 reaction 0 người được giao Xem trên GitHub
enhancement good first issue hacktoberfest help wanted source: pipenv source: poetry
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.

Per CycloneDX specification, the components' scope means (see [docs](https://cyclonedx.org/docs/1.6/json/#components_items_scope))

- "required": The component is required for runtime
- "optional": The component is optional at runtime. Optional components are components that are not capable of being called due to them not be installed or otherwise accessible by any means. Components that are installed but due to configuration or other restrictions are prohibited from being called must be scoped as 'required'.
- "excluded": Components that are excluded provide the ability to document component usage for test and other non-runtime purposes. Excluded components are not reachable within a call graph at runtime.

Current implementation does not set any scope, meaning the fallback to "required".
for dev-dependencies this would be wrong.

## Describe the solution you'd like

mark all components, that are dev-dependencies only, as "excluded" in the resulting SBOM.

## Describe alternatives you've considered

none

## Additional context

### for `poetry`

poetry knowns the "dev" group/category - things that are in there only (not in any other) are dev-dependencies

### for `pipenv`

pipenv knowns a group/category called "dev-packages" - things that are in there only (not in any other) are dev-dependencies

### for `pyproject.toml`

pyproject knows optional-dependency groups. see also [PEP735 (draft)](https://peps.python.org/pep-0735/)
there is no accepted PEP for that matter (or is there?), but commonly, people use "dev" or
"devel", "development" group to tell development-dependencies. - things that are in there, but not in any other, are dev-dependencies
Since there is no consensus here, the **pyproject SHOULD have no effect** on the `component.scope`, for now

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Theo dõi cách tạo phạm vi của các component cho các dependency của Poetry và Pipenv, sau đó so sánh việc phân nhóm package giữa các nhóm runtime và development. Hoàn thành khi các component chỉ dùng cho development được đánh dấu là "excluded", các component dùng chung giữ nguyên scope hiện tại và các nhóm dependency tùy chọn trong pyproject.toml không ảnh hưởng đến scope.

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
security, tooling
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
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
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.