CycloneDX / CycloneDX/specification

CycloneDX V1.6 - Components and services under Declarations.Targets should be unique

Open
#666 2 comments 1 reaction 0 assignees View on GitHub
CDX 1.6
Dominant language
XSLT
Stars
547
Forks
93
Avg merge
7h 11m
Merged PRs (30d)
37

Description

The uniqueness of components and services types are enforced everywhere, except under the Declarations.Targets type.

Currently it looks like this: https://github.com/CycloneDX/specification/blob/d2948509102647896eeedcddd76112b4d286acee/schema/bom-1.6.schema.json#L407-L432

I think it should include uniqueness like this?

```jsonc
{
"targets": {
"type": "object",
"title": "Targets",
"description": "The list of targets which claims are made against.",
"additionalProperties": false,
"properties": {
"organizations": {
"type": "array",
"title": "Organizations",
"description": "The list of organizations which claims are made against.",
"items": {"$ref": "#/definitions/organizationalEntity"}
},
"components": {
"type": "array",
"title": "Components",
"description": "The list of components which claims are made against.",
"items": {"$ref": "#/definitions/component"},
"uniqueItems": true // <----------------------------
},
"services": {
"type": "array",
"title": "Services",
"description": "The list of services which claims are made against.",
"items": {"$ref": "#/definitions/service"},
"uniqueItems": true // <----------------------------
}
}
},
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.