You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_classclassDataClassification:
""" 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=flowself.classification=classification@property@serializable.xml_attribute()defflow(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` """returnself._flow@flow.setterdefflow(self, flow: DataFlow) ->None:
self._flow=flow@property@serializable.xml_name('.')@serializable.xml_string(serializable.XmlStringSerializationType.NORMALIZED_STRING)defclassification(self) ->str:
""" Data classification tags data according to its type, sensitivity, and value if altered, stolen, or destroyed. Returns: `str` """returnself._classification@classification.setterdefclassification(self, classification: str) ->None:
self._classification=classificationdef__eq__(self, other: object) ->bool:
ifisinstance(other, DataClassification):
returnhash(other) ==hash(self)
returnFalsedef__lt__(self, other: object) ->bool:
ifisinstance(other, DataClassification):
return_ComparableTuple((
self.flow, self.classification
)) <_ComparableTuple((
other.flow, other.classification
))
returnNotImplementeddef__hash__(self) ->int:
returnhash((self.flow, self.classification))
def__repr__(self) ->str:
returnf'<DataClassification flow={self.flow}>'
Which seems to be missing the "source" and "destination" properties.
This my poetry.lock entry for cyclonedx-python-lib
Hi @jkowalleck, thanks for the note. Unfortunately I do not have extensive time to go through the project architecture and understand exactly how to modify the code, to implement the change consistently. I.e., I think it would take me some time.
Since it's still a somewhat minor change and related to implementing correctly the CDX spec, would you know anyone who would be able to implement it quickly?
I'd still try to give it a go if not. Thank you for consideration.
I'd still try to give it a go if not. Thank you for consideration.
take your time, no rush.
It is always best to have the users of a library themselves implement the features they need, since they know their constraints best and could provide proper test cases.
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
Which seems to be missing the "source" and "destination" properties.
This my poetry.lock entry for cyclonedx-python-lib
Would it be possible for you to adjust this, or let me know what I could do otherwise? Thank you!
The text was updated successfully, but these errors were encountered: