-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: Support multiple purl identifiers in product_identification_helper #781
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,14 +228,14 @@ A string SHOULD NOT have a length greater than: | |
* `/document/references[]/summary` | ||
* `/document/tracking/revision_history[]/summary` | ||
* `/product_tree/branches[]/product/product_identification_helper/cpe` | ||
* `/product_tree/branches[]/product/product_identification_helper/purl` | ||
* `/product_tree/branches[]/product/product_identification_helper/purls[]` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
* `/product_tree/branches[](/branches[])*/product/product_identification_helper/cpe` | ||
* `/product_tree/branches[](/branches[])*/product/product_identification_helper/purl` | ||
* `/product_tree/branches[](/branches[])*/product/product_identification_helper/purls[]` | ||
* `/product_tree/full_product_names[]/product_identification_helper/cpe` | ||
* `/product_tree/full_product_names[]/product_identification_helper/purl` | ||
* `/product_tree/full_product_names[]/product_identification_helper/purls[]` | ||
* `/product_tree/product_groups[]/summary` | ||
* `/product_tree/relationships[]/full_product_name/product_identification_helper/cpe` | ||
* `/product_tree/relationships[]/full_product_name/product_identification_helper/purl` | ||
* `/product_tree/relationships[]/full_product_name/product_identification_helper/purls[]` | ||
* `/vulnerabilities[]/acknowledgments[]/summary` | ||
* `/vulnerabilities[]/involvements[]/summary` | ||
* `/vulnerabilities[]/references[]/summary` | ||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -41,7 +41,7 @@ Product ID (`product_id`) holds a value of type Product ID (`product_id_t`). | |||||||||
|
||||||||||
Helper to identify the product (`product_identification_helper`) of value type `object` provides in its properties at least | ||||||||||
one method which aids in identifying the product in an asset database. | ||||||||||
Of the given eight properties `cpe`, `hashes`, `model_numbers`, `purl`, `sbom_urls`, `serial_numbers`, `skus`, | ||||||||||
Of the given eight properties `cpe`, `hashes`, `model_numbers`, `purls`, `sbom_urls`, `serial_numbers`, `skus`, | ||||||||||
and `x_generic_uris`, one is mandatory. | ||||||||||
|
||||||||||
``` | ||||||||||
|
@@ -51,27 +51,27 @@ and `x_generic_uris`, one is mandatory. | |||||||||
"cpe": { | ||||||||||
// ... | ||||||||||
}, | ||||||||||
"hashes": [ | ||||||||||
"hashes": { | ||||||||||
// ... | ||||||||||
], | ||||||||||
"model_numbers": [ | ||||||||||
}, | ||||||||||
"model_numbers": { | ||||||||||
// ... | ||||||||||
], | ||||||||||
"purl": { | ||||||||||
}, | ||||||||||
"purls": { | ||||||||||
// ... | ||||||||||
}, | ||||||||||
"sbom_urls": [ | ||||||||||
"sbom_urls": { | ||||||||||
// ... | ||||||||||
], | ||||||||||
"serial_numbers": [ | ||||||||||
}, | ||||||||||
"serial_numbers": { | ||||||||||
// ... | ||||||||||
], | ||||||||||
"skus": [ | ||||||||||
}, | ||||||||||
"skus": { | ||||||||||
// ... | ||||||||||
], | ||||||||||
"x_generic_uris": [ | ||||||||||
}, | ||||||||||
"x_generic_uris": { | ||||||||||
// ... | ||||||||||
] | ||||||||||
} | ||||||||||
} | ||||||||||
} | ||||||||||
``` | ||||||||||
|
@@ -239,9 +239,10 @@ Two `*` MUST NOT follow each other. | |||||||||
IC25T060ATCS05-0 | ||||||||||
``` | ||||||||||
|
||||||||||
##### Full Product Name Type - Product Identification Helper - purl | ||||||||||
##### Full Product Name Type - Product Identification Helper - purls | ||||||||||
|
||||||||||
The package URL (purl) representation (`purl`) is a `string` of 7 or more characters with `pattern` (regular expression): | ||||||||||
List of purls (`purls`) of value type `array` with 1 or more items contains a list of package URL (purl) identifiers. | ||||||||||
A purl is a `string` of 7 or more characters that meets the criteria of `pattern` (regular expression): | ||||||||||
Comment on lines
+244
to
+245
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please make sure that aligns with other sections that use an array, e.g. remediations or notes. |
||||||||||
|
||||||||||
``` | ||||||||||
^pkg:[A-Za-z\\.\\-\\+][A-Za-z0-9\\.\\-\\+]*\\/.+ | ||||||||||
|
@@ -252,8 +253,11 @@ The package URL (purl) representation (`purl`) is a `string` of 7 or more charac | |||||||||
> CSAF uses only the canonical form of purl to conform with section 3.3 of [cite](#RFC3986). | ||||||||||
> Therefore, URLs starting with `pkg://` are considered invalid. | ||||||||||
This package URL (purl) attribute refers to a method for reliably identifying and locating software packages external to this specification. | ||||||||||
See [cite](#PURL) for details. | ||||||||||
A package URL (purl) attribute refers to a method for reliably identifying and locating software packages external to this specification. | ||||||||||
See [cite](#PURL) for details. Multiple purls can be specified to allow for identifiers to locate identical components in different locations. | ||||||||||
|
||||||||||
If multiple purls are specified, they MUST only differ in their qualifiers. Otherwise, separate product branches should | ||||||||||
be used to differentiate between the components. | ||||||||||
Comment on lines
+259
to
+260
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
##### Full Product Name Type - Product Identification Helper - SBOM URLs | ||||||||||
|
||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,9 @@ It MUST be tested that given purl is valid. | |
The relevant paths for this test are: | ||
|
||
``` | ||
/product_tree/branches[](/branches[])*/product/product_identification_helper/purl | ||
/product_tree/full_product_names[]/product_identification_helper/purl | ||
/product_tree/relationships[]/full_product_name/product_identification_helper/purl | ||
/product_tree/branches[](/branches[])*/product/product_identification_helper/purls[] | ||
/product_tree/full_product_names[]/product_identification_helper/purls[] | ||
/product_tree/relationships[]/full_product_name/product_identification_helper/purls[] | ||
``` | ||
|
||
*Example 1 (which fails the test):* | ||
|
@@ -19,11 +19,35 @@ The relevant paths for this test are: | |
"name": "Product A", | ||
"product_id": "CSAFPID-9080700", | ||
"product_identification_helper": { | ||
"purl": "pkg:maven/@1.3.4" | ||
"purls": [ | ||
"pkg:maven/@1.3.4" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
> Any valid purl has a name component. | ||
It MUST also be tested that if more than one purl is specified, they can only differ in their qualifiers. | ||
|
||
*Example 2 (which fails the test):* | ||
|
||
``` | ||
"product_tree": { | ||
"full_product_names": [ | ||
{ | ||
"name": "Product A", | ||
"product_id": "CSAFPID-9080700", | ||
"product_identification_helper": { | ||
"purls": [ | ||
"pkg:maven/org.example.blue/[email protected]", | ||
"pkg:maven/org.example.blue/[email protected]" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
> The two purls differ in the name component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess those should be unique...