feat: Data object for Service properties
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
DataClassification クラスと Service のデータプロパティから始め、次に、それらの表現を issue にリンクされている CycloneDX 1.6 JSON services schema と比較します。source と destination がどのように現れることを想定されているかを確認し、Service data がスキーマの必須フィールドをサポートし、結果のシリアライズがスキーマと一致した時点で作業完了とします。
索引モデルが issue の本文から書いたものです。
説明
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!
- 主要言語
- Python
- スター
- 117
- フォーク
- 67
- 平均マージ
- 21時間 9分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CycloneDX/cyclonedx-python-lib のほかの issue
-
[PERF] Quadratic (O(N^2)) serialization time for large BOMs — `Bom.validate()` → `register_dependency()` linear scan対応中かも @inspired-geek が 110 日前に担当しました。 オープンperformance
難易度 3/5 1〜2日 初心者へのやさしさ 36/100
CycloneDX/cyclonedx-python-lib#1006 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
tests: test all model enums再び着手できるかも @jkowalleck が 125 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンQA
CycloneDX/cyclonedx-python-lib#991 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
feat(deps)!: make all de/serialization libraries optional再び着手できるかも @Simoh23999 が 73 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbreaking change dependencies
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
CycloneDX/cyclonedx-python-lib#979 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
feat: Add support for Component signature対応中かも @wiebe-vandendriessche が 124 日前に担当しました。 オープンenhancement help wanted schema 1.4
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
CycloneDX/cyclonedx-python-lib#978 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
chore: have coverage uploaded consitently再び着手できるかも @jkowalleck が 172 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンchore
CycloneDX/cyclonedx-python-lib#966 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
CycloneDX/cyclonedx-python-lib の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
PedestrianDynamics/pyFDS-Evac#766 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 91/100
alchaincyf/nuwa-skill#86 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
-
Docs Needs Triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
pandas-dev/pandas#71055 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: graphify reads files that git's global ignore file hides対応中かも @smngvlkz が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Graphify-Labs/graphify#4335 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信