Skip to content

Commit 0cbfd1a

Browse files
authored
Merge pull request #218 from ppkarwasz/feat/artifact-version
Add `version` field to TEA Artifact
2 parents 09fc842 + 3051357 commit 0cbfd1a

2 files changed

Lines changed: 75 additions & 7 deletions

File tree

spec/openapi.yaml

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -482,10 +482,10 @@ paths:
482482
$ref: "#/components/responses/404-object-by-id-not-found"
483483
tags:
484484
- TEA Component Release
485-
/artifact/{uuid}:
485+
/artifact/{uuid}/latest:
486486
get:
487-
description: Get metadata for specific TEA Artifact
488-
operationId: getArtifact
487+
description: Get metadata for latest revision of a specific TEA Artifact
488+
operationId: getLatestArtifact
489489
parameters:
490490
- name: uuid
491491
in: path
@@ -506,6 +506,36 @@ paths:
506506
$ref: "#/components/responses/404-object-by-id-not-found"
507507
tags:
508508
- TEA Artifact
509+
/artifact/{uuid}/{artifactVersion}:
510+
get:
511+
description: Get metadata for a specific revision of a specific TEA Artifact
512+
operationId: getArtifactByVersion
513+
parameters:
514+
- name: uuid
515+
in: path
516+
required: true
517+
description: UUID of TEA Artifact in the TEA server
518+
schema:
519+
"$ref": "#/components/schemas/uuid"
520+
- name: artifactVersion
521+
in: path
522+
required: true
523+
description: Version of TEA Artifact
524+
schema:
525+
type: integer
526+
responses:
527+
'200':
528+
description: Requested TEA Artifact metadata found and returned
529+
content:
530+
application/json:
531+
schema:
532+
"$ref": "#/components/schemas/artifact"
533+
'400':
534+
$ref: "#/components/responses/400-invalid-request"
535+
'404':
536+
$ref: "#/components/responses/404-object-by-id-not-found"
537+
tags:
538+
- TEA Artifact
509539
/discovery:
510540
get:
511541
description: Discovery endpoint which resolves TEI into product release UUID.
@@ -997,7 +1027,7 @@ components:
9971027
examples:
9981028
# Documents in the latest release of Log4j Core
9991029
- uuid: 4c72fe22-9d83-4c2f-8eba-d6db484f32c8
1000-
version: 3
1030+
version: 10
10011031
date: 2024-12-13T00:00:00Z
10021032
updateReason:
10031033
type: ARTIFACT_UPDATED
@@ -1017,6 +1047,7 @@ components:
10171047
- algType: SHA-1
10181048
algValue: 5a7d4caef63c5c5ccdf07c39337323529eb5a770
10191049
- uuid: dfa35519-9734-4259-bba1-3e825cf4be06
1050+
version: 7
10201051
name: Vulnerability Disclosure Report
10211052
type: VULNERABILITIES
10221053
formats:
@@ -1062,8 +1093,15 @@ components:
10621093
description: A security-related document
10631094
properties:
10641095
uuid:
1065-
description: UUID of the TEA Artifact object.
1096+
description: The UUID of the TEA Artifact object. Together with *version* uniquely identifies the TEA Artifact.
10661097
"$ref": "#/components/schemas/uuid"
1098+
version:
1099+
description: |
1100+
An integer with default value 1.
1101+
Together with *uuid* uniquely identifies the TEA Artifact.
1102+
This field can be used to designate successive, immutable revisions of an artefact content (e.g. an updated VEX file).
1103+
type: integer
1104+
default: 1
10671105
name:
10681106
type: string
10691107
description: Name of TEA Artifact
@@ -1093,6 +1131,31 @@ components:
10931131
- uuid
10941132
- type
10951133
- formats
1134+
examples:
1135+
- uuid: 1cb47b95-8bf8-3bad-a5a4-0d54d86e10ce
1136+
name: Build SBOM
1137+
type: BOM
1138+
formats:
1139+
- mediaType: application/vnd.cyclonedx+xml
1140+
description: CycloneDX SBOM (XML)
1141+
url: https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-core/2.24.3/log4j-core-2.24.3-cyclonedx.xml
1142+
signatureUrl: https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-core/2.24.3/log4j-core-2.24.3-cyclonedx.xml.asc
1143+
checksums:
1144+
- algType: MD5
1145+
algValue: 2e1a525afc81b0a8ecff114b8b743de9
1146+
- algType: SHA-1
1147+
algValue: 5a7d4caef63c5c5ccdf07c39337323529eb5a770
1148+
- uuid: dfa35519-9734-4259-bba1-3e825cf4be06
1149+
version: 7
1150+
name: Vulnerability Disclosure Report
1151+
type: VULNERABILITIES
1152+
formats:
1153+
- mediaType: application/vnd.cyclonedx+xml
1154+
description: CycloneDX VDR (XML)
1155+
url: https://logging.apache.org/cyclonedx/vdr.xml
1156+
checksums:
1157+
- algType: SHA-256
1158+
algValue: 75b81020b3917cb682b1a7605ade431e062f7a4c01a412f0b87543b6e995ad2a
10961159
artifact-type:
10971160
type: string
10981161
description: Specifies the type of external reference.

tea-collection/tea-collection.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,11 @@ If this field is absent, the TEA Artifact is considered applicable to all distri
342342

343343
A TEA Artifact object contains the following fields:
344344

345-
- __uuid__: The UUID of the TEA Artefact object. This uniquely identifies the TEA Artifact.
345+
- __uuid__: The UUID of the TEA Artifact object. Together with *version* uniquely identifies the TEA Artifact.
346+
- __version__:
347+
An integer with default value 1.
348+
Together with *uuid* uniquely identifies the TEA Artifact.
349+
This field can be used to designate successive, immutable revisions of an artefact content (e.g. an updated VEX file).
346350
- __name__: A human-readable name for the artefact.
347351
- __type__: The type of artefact. See [TEA Artifact types](#tea-artefact-types) for allowed values (e.g., `BOM`, `VULNERABILITIES`, `LICENSE`).
348352
- __createdDate__: The date and time the TEA Artefact revision was created.
@@ -403,7 +407,7 @@ producing different alerts than other changes of a collection.
403407
```json
404408
{
405409
"uuid": "4c72fe22-9d83-4c2f-8eba-d6db484f32c8",
406-
"version": 1,
410+
"version": 10,
407411
"date": "2024-12-13T00:00:00Z",
408412
"updateReason": {
409413
"type": "ARTIFACT_UPDATED",
@@ -435,6 +439,7 @@ producing different alerts than other changes of a collection.
435439
},
436440
{
437441
"uuid": "dfa35519-9734-4259-bba1-3e825cf4be06",
442+
"version": 7,
438443
"name": "Vulnerability Disclosure Report",
439444
"type": "VULNERABILITIES",
440445
"formats": [

0 commit comments

Comments
 (0)