feat: Data object for Service properties
Maintainer thường phản hồi trong vòng 1 ngày
@lucamrgs đang làm issue này rồi.
Từ ngày 23/9/2024.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Bắt đầu với lớp DataClassification và thuộc tính dữ liệu của Service, sau đó so sánh cách biểu diễn của chúng với services schema JSON CycloneDX 1.6 được liên kết trong issue. Xác nhận source và destination được kỳ vọng xuất hiện như thế nào, và coi công việc hoàn tất khi dữ liệu Service hỗ trợ các trường bắt buộc của schema và kết quả serialization khớp với schema đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Dear implementers,
it appears to me that the Data object for the Services property is not correctly implemented (see https://cyclonedx.org/docs/1.6/json/#services_items_data).
I am trying to instantiate a Service, and upon populating the data property, I get this hint from the docs
The DataClassification class is defined as
@serializable.serializable_class
class DataClassification:
"""
This is our internal representation of the `dataClassificationType` complex type within the CycloneDX standard.
DataClassification might be deprecated since CycloneDX 1.5, but it is not deprecated in this library.
In fact, this library will try to provide a compatibility layer if needed.
.. note::
See the CycloneDX Schema for dataClassificationType:
https://cyclonedx.org/docs/1.4/xml/#type_dataClassificationType
"""
def __init__(
self, *,
flow: DataFlow,
classification: str
) -> None:
self.flow = flow
self.classification = classification
@property
@serializable.xml_attribute()
def flow(self) -> DataFlow:
"""
Specifies the flow direction of the data.
Valid values are: inbound, outbound, bi-directional, and unknown.
Direction is relative to the service.
- Inbound flow states that data enters the service
- Outbound flow states that data leaves the service
- Bi-directional states that data flows both ways
- Unknown states that the direction is not known
Returns:
`DataFlow`
"""
return self._flow
@flow.setter
def flow(self, flow: DataFlow) -> None:
self._flow = flow
@property
@serializable.xml_name('.')
@serializable.xml_string(serializable.XmlStringSerializationType.NORMALIZED_STRING)
def classification(self) -> str:
"""
Data classification tags data according to its type, sensitivity, and value if altered, stolen, or destroyed.
Returns:
`str`
"""
return self._classification
@classification.setter
def classification(self, classification: str) -> None:
self._classification = classification
def __eq__(self, other: object) -> bool:
if isinstance(other, DataClassification):
return hash(other) == hash(self)
return False
def __lt__(self, other: object) -> bool:
if isinstance(other, DataClassification):
return _ComparableTuple((
self.flow, self.classification
)) < _ComparableTuple((
other.flow, other.classification
))
return NotImplemented
def __hash__(self) -> int:
return hash((self.flow, self.classification))
def __repr__(self) -> str:
return f'<DataClassification flow={self.flow}>'
Which seems to be missing the "source" and "destination" properties.
This my poetry.lock entry for cyclonedx-python-lib
name = "cyclonedx-python-lib"
version = "7.6.0"
description = "Python library for CycloneDX"
optional = false
python-versions = "<4.0,>=3.8"
files = [
{file = "cyclonedx_python_lib-7.6.0-py3-none-any.whl", hash = "sha256:30655e89e5f987dc8d57835919748d71589fafeb33ff1dec45048eb72eda3cf9"},
{file = "cyclonedx_python_lib-7.6.0.tar.gz", hash = "sha256:fa481d5f0d82728cb6a32e55f8ba9c666ba75a2bd99eb643228e3011c56bb5c4"},
]
Would it be possible for you to adjust this, or let me know what I could do otherwise? Thank you!
- Ngôn ngữ chính
- Python
- Star
- 117
- Fork
- 67
- Merge trung bình
- 21 giờ 9 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CycloneDX/cyclonedx-python-lib
-
[PERF] Quadratic (O(N^2)) serialization time for large BOMs — `Bom.validate()` → `register_dependency()` linear scanCó thể đã có người làm @inspired-geek đã nhận 110 ngày trước. Đang mởperformance
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 36/100
CycloneDX/cyclonedx-python-lib#1006 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tests: test all model enumsCó thể làm lại được @jkowalleck đã nhận 125 ngày trước và không có pull request nào đang mở. Đang mởQA
CycloneDX/cyclonedx-python-lib#991 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feat(deps)!: make all de/serialization libraries optionalCó thể làm lại được @Simoh23999 đã nhận 73 ngày trước và không có pull request nào đang mở. Đang mởbreaking change dependencies
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
CycloneDX/cyclonedx-python-lib#979 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feat: Add support for Component signatureCó thể đã có người làm @wiebe-vandendriessche đã nhận 124 ngày trước. Đang mởenhancement help wanted schema 1.4
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
CycloneDX/cyclonedx-python-lib#978 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore: have coverage uploaded consitentlyCó thể làm lại được @jkowalleck đã nhận 172 ngày trước và không có pull request nào đang mở. Đang mởchore
CycloneDX/cyclonedx-python-lib#966 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của CycloneDX/cyclonedx-python-lib
Issue tương tự
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
darnitdevorg/darnit#587 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
llm translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug bug-hunt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày