Skip to content

Cdx-go and JSON schema inconsistency - fields missing from DataService #208

Open
@c3st7n

Description

@c3st7n

The cyclonedx-go implementation is missing all the option fields for the serviceData field.

"serviceData": {
"type": "object",
"title": "Hash Objects",
"required": [
"flow",
"classification"
],
"additionalProperties": false,
"properties": {
"flow": {
"$ref": "#/definitions/dataFlowDirection",
"title": "Directional Flow",
"description": "Specifies the flow direction of the data. 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 and unknown states that the direction is not known."
},
"classification": {
"$ref": "#/definitions/dataClassification"
},
"name": {
"type": "string",
"title": "Name",
"description": "Name for the defined data",
"examples": [
"Credit card reporting"
]
},
"description": {
"type": "string",
"title": "Description",
"description": "Short description of the data content and usage",
"examples": [
"Credit card information being exchanged in between the web app and the database"
]
},
"governance": {
"title": "Data Governance",
"$ref": "#/definitions/dataGovernance"
},
"source": {
"type": "array",
"items": {
"anyOf": [
{
"title": "URL",
"type": "string",
"format": "iri-reference"
},
{
"title": "BOM-Link Element",
"$ref": "#/definitions/bomLinkElementType"
}
]
},
"title": "Source",
"description": "The URI, URL, or BOM-Link of the components or services the data came in from"
},
"destination": {
"type": "array",
"items": {
"anyOf": [
{
"title": "URL",
"type": "string",
"format": "iri-reference"
},
{
"title": "BOM-Link Element",
"$ref": "#/definitions/bomLinkElementType"
}
]
},
"title": "Destination",
"description": "The URI, URL, or BOM-Link of the components or services the data is sent to"
}
}
},

In type Service:

Data *[]DataClassification `json:"data,omitempty" xml:"data>classification,omitempty"`

In type DataClassification:

cyclonedx-go/cyclonedx.go

Lines 519 to 522 in 8508cc1

type DataClassification struct {
Flow DataFlow `json:"flow" xml:"flow,attr"`
Classification string `json:"classification" xml:",chardata"`
}

The struct is missing name, description, governance, source and destination fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions