From d50fa268160d9dc8efb9cfd8b0bf89c4d0f6231f Mon Sep 17 00:00:00 2001 From: Alex Alzate Date: Tue, 2 Apr 2024 15:39:58 -0500 Subject: [PATCH] Update test files --- ...-license-missing-id-and-name-1.6.textproto | 3 + .../1.6/invalid-properties-1.6.textproto | 3 + .../1.6/valid-annotation-1.6.textproto | 3 + .../1.6/valid-assembly-1.6.textproto | 3 + .../1.6/valid-attestation-1.6.textproto | 3 + src/test/resources/1.6/valid-bom-1.6.json | 3 +- .../resources/1.6/valid-bom-1.6.textproto | 4 ++ .../1.6/valid-component-hashes-1.6.textproto | 3 + .../1.6/valid-component-identifiers-1.6.json | 24 +++++++ .../valid-component-identifiers-1.6.textproto | 18 +++++ .../1.6/valid-component-identifiers-1.6.xml | 16 +++++ .../1.6/valid-component-ref-1.6.textproto | 3 + .../1.6/valid-component-swid-1.6.textproto | 3 + .../valid-component-swid-full-1.6.textproto | 3 + .../1.6/valid-component-types-1.6.textproto | 3 + .../1.6/valid-compositions-1.6.textproto | 3 + .../1.6/valid-cryptography-full-1.6.textproto | 3 + ...-cryptography-implementation-1.6.textproto | 3 + .../1.6/valid-dependency-1.6.textproto | 3 + .../1.6/valid-empty-components-1.6.textproto | 3 + .../resources/1.6/valid-evidence-1.6.json | 3 + .../1.6/valid-evidence-1.6.textproto | 6 ++ src/test/resources/1.6/valid-evidence-1.6.xml | 3 + .../valid-external-reference-1.6.textproto | 3 + .../1.6/valid-formulation-1.6.textproto | 3 + .../1.6/valid-license-expression-1.6.json | 1 + .../valid-license-expression-1.6.textproto | 4 ++ .../1.6/valid-license-expression-1.6.xml | 2 +- .../resources/1.6/valid-license-id-1.6.json | 1 + .../1.6/valid-license-id-1.6.textproto | 4 ++ .../resources/1.6/valid-license-id-1.6.xml | 2 +- .../1.6/valid-license-licensing-1.6.textproto | 3 + .../1.6/valid-license-name-1.6.textproto | 3 + .../1.6/valid-machine-learning-1.6.textproto | 3 + ...chine-learning-considerations-env-1.6.json | 65 +++++++++++++++++++ ...-learning-considerations-env-1.6.textproto | 57 ++++++++++++++++ ...achine-learning-considerations-env-1.6.xml | 57 ++++++++++++++++ .../1.6/valid-metadata-author-1.6.textproto | 3 + .../1.6/valid-metadata-license-1.6.json | 8 +++ .../1.6/valid-metadata-license-1.6.textproto | 11 ++++ .../1.6/valid-metadata-license-1.6.xml | 10 ++- .../valid-metadata-lifecycle-1.6.textproto | 3 + .../valid-metadata-manufacture-1.6.textproto | 3 + .../valid-metadata-manufacturer-1.6.textproto | 3 + .../1.6/valid-metadata-supplier-1.6.textproto | 3 + .../valid-metadata-timestamp-1.6.textproto | 3 + .../1.6/valid-metadata-tool-1.6.textproto | 3 + ...lid-metadata-tool-deprecated-1.6.textproto | 3 + .../1.6/valid-minimal-viable-1.6.textproto | 3 + .../resources/1.6/valid-patch-1.6.textproto | 3 + .../1.6/valid-properties-1.6.textproto | 3 + .../1.6/valid-release-notes-1.6.textproto | 5 +- .../resources/1.6/valid-saasbom-1.6.textproto | 3 + .../resources/1.6/valid-service-1.6.textproto | 3 + .../valid-service-empty-objects-1.6.textproto | 3 + .../1.6/valid-standard-1.6.textproto | 3 + .../resources/1.6/valid-tags-1.6.textproto | 3 + .../1.6/valid-vulnerability-1.6.textproto | 3 + 58 files changed, 409 insertions(+), 6 deletions(-) create mode 100644 src/test/resources/1.6/valid-component-identifiers-1.6.json create mode 100644 src/test/resources/1.6/valid-component-identifiers-1.6.textproto create mode 100644 src/test/resources/1.6/valid-component-identifiers-1.6.xml create mode 100644 src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.json create mode 100644 src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.textproto create mode 100644 src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.xml diff --git a/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.textproto b/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.textproto index 14f6a657a..db656e6eb 100644 --- a/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.textproto +++ b/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/invalid-properties-1.6.textproto b/src/test/resources/1.6/invalid-properties-1.6.textproto index 9afebf51a..a707e762f 100644 --- a/src/test/resources/1.6/invalid-properties-1.6.textproto +++ b/src/test/resources/1.6/invalid-properties-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:bcb403ae-91fa-436e-bc93-84d1078cdeed" diff --git a/src/test/resources/1.6/valid-annotation-1.6.textproto b/src/test/resources/1.6/valid-annotation-1.6.textproto index 69b105829..65eb21ede 100644 --- a/src/test/resources/1.6/valid-annotation-1.6.textproto +++ b/src/test/resources/1.6/valid-annotation-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-assembly-1.6.textproto b/src/test/resources/1.6/valid-assembly-1.6.textproto index 1434e7f2b..ea47f51cf 100644 --- a/src/test/resources/1.6/valid-assembly-1.6.textproto +++ b/src/test/resources/1.6/valid-assembly-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-attestation-1.6.textproto b/src/test/resources/1.6/valid-attestation-1.6.textproto index f9f4f9e09..163213085 100644 --- a/src/test/resources/1.6/valid-attestation-1.6.textproto +++ b/src/test/resources/1.6/valid-attestation-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-bom-1.6.json b/src/test/resources/1.6/valid-bom-1.6.json index f077c7938..6244850f5 100644 --- a/src/test/resources/1.6/valid-bom-1.6.json +++ b/src/test/resources/1.6/valid-bom-1.6.json @@ -185,7 +185,8 @@ ], "group": "org.example", "name": "mylibrary", - "version": "1.0.0" + "version": "1.0.0", + "scope": "required" } ], "dependencies": [ diff --git a/src/test/resources/1.6/valid-bom-1.6.textproto b/src/test/resources/1.6/valid-bom-1.6.textproto index b10099154..3d7937071 100644 --- a/src/test/resources/1.6/valid-bom-1.6.textproto +++ b/src/test/resources/1.6/valid-bom-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" @@ -142,6 +145,7 @@ components { group: "org.example" name: "mylibrary" version: "1.0.0" + scope: SCOPE_REQUIRED manufacturer { name: "Example-2, Inc." url: "https://example.org" diff --git a/src/test/resources/1.6/valid-component-hashes-1.6.textproto b/src/test/resources/1.6/valid-component-hashes-1.6.textproto index e29665c77..2c74661d4 100644 --- a/src/test/resources/1.6/valid-component-hashes-1.6.textproto +++ b/src/test/resources/1.6/valid-component-hashes-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-component-identifiers-1.6.json b/src/test/resources/1.6/valid-component-identifiers-1.6.json new file mode 100644 index 000000000..37175a6ef --- /dev/null +++ b/src/test/resources/1.6/valid-component-identifiers-1.6.json @@ -0,0 +1,24 @@ +{ + "bomFormat": "CycloneDX", + "specVersion": "1.6", + "serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", + "version": 1, + "components": [ + { + "type": "library", + "group": "com.example", + "name": "acme-library", + "version": "1.0.0", + "cpe": "cpe:2.3:a:example:acme-library:1.0.0:*:*:*:*:*:*:*", + "purl": "pkg:maven/com.example/acme-library@1.0.0", + "omniborId": [ + "gitoid:blob:sha1:261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "gitoid:blob:sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" + ], + "swhid": [ + "swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2", + "swh:1:dir:d198bc9d7a6bcf6db04f476d29314f157507d505" + ] + } + ] +} diff --git a/src/test/resources/1.6/valid-component-identifiers-1.6.textproto b/src/test/resources/1.6/valid-component-identifiers-1.6.textproto new file mode 100644 index 000000000..26ffb8e26 --- /dev/null +++ b/src/test/resources/1.6/valid-component-identifiers-1.6.textproto @@ -0,0 +1,18 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + +spec_version: "1.6" +version: 1 +serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" +components { + type: CLASSIFICATION_LIBRARY + group: "com.example" + name: "acme-example" + version: "1.0.0" + cpe: "cpe:2.3:a:example:acme-library:1.0.0:*:*:*:*:*:*:*" + purl: "pkg:maven/com.example/acme-library@1.0.0" + omniborId: "gitoid:blob:sha1:261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64" + omniborId: "gitoid:blob:sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" + swhid: "swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2" + swhid: "swh:1:dir:d198bc9d7a6bcf6db04f476d29314f157507d505" +} diff --git a/src/test/resources/1.6/valid-component-identifiers-1.6.xml b/src/test/resources/1.6/valid-component-identifiers-1.6.xml new file mode 100644 index 000000000..bf74b7df5 --- /dev/null +++ b/src/test/resources/1.6/valid-component-identifiers-1.6.xml @@ -0,0 +1,16 @@ + + + + + com.example + acme-library + 1.0.0 + cpe:2.3:a:example:acme-library:1.0.0:*:*:*:*:*:*:* + pkg:maven/com.example/acme-library@1.0.0 + gitoid:blob:sha1:261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 + gitoid:blob:sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 + swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2 + swh:1:dir:d198bc9d7a6bcf6db04f476d29314f157507d505 + + + diff --git a/src/test/resources/1.6/valid-component-ref-1.6.textproto b/src/test/resources/1.6/valid-component-ref-1.6.textproto index fa6468393..773a2decf 100644 --- a/src/test/resources/1.6/valid-component-ref-1.6.textproto +++ b/src/test/resources/1.6/valid-component-ref-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-component-swid-1.6.textproto b/src/test/resources/1.6/valid-component-swid-1.6.textproto index 43ff0d918..653807339 100644 --- a/src/test/resources/1.6/valid-component-swid-1.6.textproto +++ b/src/test/resources/1.6/valid-component-swid-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-component-swid-full-1.6.textproto b/src/test/resources/1.6/valid-component-swid-full-1.6.textproto index 043aaf315..5d4e6a0ea 100644 --- a/src/test/resources/1.6/valid-component-swid-full-1.6.textproto +++ b/src/test/resources/1.6/valid-component-swid-full-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-component-types-1.6.textproto b/src/test/resources/1.6/valid-component-types-1.6.textproto index 8416d660f..d62c94d83 100644 --- a/src/test/resources/1.6/valid-component-types-1.6.textproto +++ b/src/test/resources/1.6/valid-component-types-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-compositions-1.6.textproto b/src/test/resources/1.6/valid-compositions-1.6.textproto index ea7b75ac6..1218f0262 100644 --- a/src/test/resources/1.6/valid-compositions-1.6.textproto +++ b/src/test/resources/1.6/valid-compositions-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-cryptography-full-1.6.textproto b/src/test/resources/1.6/valid-cryptography-full-1.6.textproto index a135dc63f..904848c78 100644 --- a/src/test/resources/1.6/valid-cryptography-full-1.6.textproto +++ b/src/test/resources/1.6/valid-cryptography-full-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-cryptography-implementation-1.6.textproto b/src/test/resources/1.6/valid-cryptography-implementation-1.6.textproto index a7b1a0be0..de14145f7 100644 --- a/src/test/resources/1.6/valid-cryptography-implementation-1.6.textproto +++ b/src/test/resources/1.6/valid-cryptography-implementation-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + # proto-file: schema/bom-1.6.proto # proto-message: diff --git a/src/test/resources/1.6/valid-dependency-1.6.textproto b/src/test/resources/1.6/valid-dependency-1.6.textproto index c3e9a248a..363dfba93 100644 --- a/src/test/resources/1.6/valid-dependency-1.6.textproto +++ b/src/test/resources/1.6/valid-dependency-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-empty-components-1.6.textproto b/src/test/resources/1.6/valid-empty-components-1.6.textproto index b58adef13..b40b7c6d8 100644 --- a/src/test/resources/1.6/valid-empty-components-1.6.textproto +++ b/src/test/resources/1.6/valid-empty-components-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-evidence-1.6.json b/src/test/resources/1.6/valid-evidence-1.6.json index b4e0e71fc..b80656bb8 100644 --- a/src/test/resources/1.6/valid-evidence-1.6.json +++ b/src/test/resources/1.6/valid-evidence-1.6.json @@ -117,6 +117,7 @@ { "field": "group", "confidence": 0.1, + "concludedValue": "com.example", "methods": [ { "technique": "filename", @@ -128,6 +129,7 @@ { "field": "name", "confidence": 0.1, + "concludedValue": "example-project", "methods": [ { "technique": "filename", @@ -139,6 +141,7 @@ { "field": "version", "confidence": 0.1, + "concludedValue": "1.0.0", "methods": [ { "technique": "filename", diff --git a/src/test/resources/1.6/valid-evidence-1.6.textproto b/src/test/resources/1.6/valid-evidence-1.6.textproto index c0704d7f0..216e9bb5c 100644 --- a/src/test/resources/1.6/valid-evidence-1.6.textproto +++ b/src/test/resources/1.6/valid-evidence-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + # proto-file: bom-1.6.proto # proto-message: Bom @@ -119,6 +122,7 @@ components [ value: "example-project-1.0.0.jar" } ] + concludedValue: "com.example" }, { field: EVIDENCE_FIELD_NAME @@ -130,6 +134,7 @@ components [ value: "example-project-1.0.0.jar" } ] + concludedValue: "example-project" }, { field: EVIDENCE_FIELD_VERSION @@ -141,6 +146,7 @@ components [ value: "example-project-1.0.0.jar" } ] + concludedValue: "1.0.0" } ] } diff --git a/src/test/resources/1.6/valid-evidence-1.6.xml b/src/test/resources/1.6/valid-evidence-1.6.xml index 336d96c3d..32d96983b 100644 --- a/src/test/resources/1.6/valid-evidence-1.6.xml +++ b/src/test/resources/1.6/valid-evidence-1.6.xml @@ -97,6 +97,7 @@ group 0.1 + com.example filename @@ -108,6 +109,7 @@ name 0.1 + example-project filename @@ -119,6 +121,7 @@ version 0.1 + 1.0.0 filename diff --git a/src/test/resources/1.6/valid-external-reference-1.6.textproto b/src/test/resources/1.6/valid-external-reference-1.6.textproto index c2d5d672b..0428a8e9a 100644 --- a/src/test/resources/1.6/valid-external-reference-1.6.textproto +++ b/src/test/resources/1.6/valid-external-reference-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-formulation-1.6.textproto b/src/test/resources/1.6/valid-formulation-1.6.textproto index f9c11475c..e7deb4abb 100644 --- a/src/test/resources/1.6/valid-formulation-1.6.textproto +++ b/src/test/resources/1.6/valid-formulation-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-license-expression-1.6.json b/src/test/resources/1.6/valid-license-expression-1.6.json index 140b5a78f..057ad915f 100644 --- a/src/test/resources/1.6/valid-license-expression-1.6.json +++ b/src/test/resources/1.6/valid-license-expression-1.6.json @@ -13,6 +13,7 @@ "licenses": [ { "expression": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0", + "acknowledgement": "declared", "bom-ref": "my-license" } ] diff --git a/src/test/resources/1.6/valid-license-expression-1.6.textproto b/src/test/resources/1.6/valid-license-expression-1.6.textproto index 423761007..8ecb32535 100644 --- a/src/test/resources/1.6/valid-license-expression-1.6.textproto +++ b/src/test/resources/1.6/valid-license-expression-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" @@ -9,5 +12,6 @@ components { version: "9.0.14" licenses { expression: "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0" + acknowledgement: LICENSE_ACKNOWLEDGEMENT_ENUMERATION_DECLARED } } diff --git a/src/test/resources/1.6/valid-license-expression-1.6.xml b/src/test/resources/1.6/valid-license-expression-1.6.xml index 23b3ac3bd..4eb0a6f73 100644 --- a/src/test/resources/1.6/valid-license-expression-1.6.xml +++ b/src/test/resources/1.6/valid-license-expression-1.6.xml @@ -15,7 +15,7 @@ e8f33e424f3f4ed6db76a482fde1a5298970e442c531729119e37991884bdffab4f9426b7ee11fccd074eeda0634d71697d6f88a460dce0ac8d627a29f7d1282 - + EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 diff --git a/src/test/resources/1.6/valid-license-id-1.6.json b/src/test/resources/1.6/valid-license-id-1.6.json index 1b80e90e7..07ec492d7 100644 --- a/src/test/resources/1.6/valid-license-id-1.6.json +++ b/src/test/resources/1.6/valid-license-id-1.6.json @@ -14,6 +14,7 @@ { "license": { "id": "Apache-2.0", + "acknowledgement": "declared", "bom-ref": "my-license" } } diff --git a/src/test/resources/1.6/valid-license-id-1.6.textproto b/src/test/resources/1.6/valid-license-id-1.6.textproto index e4ecfffa0..228ff80b7 100644 --- a/src/test/resources/1.6/valid-license-id-1.6.textproto +++ b/src/test/resources/1.6/valid-license-id-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" @@ -10,6 +13,7 @@ components { licenses { license { id: "Apache-2.0" + acknowledgement: LICENSE_ACKNOWLEDGEMENT_ENUMERATION_DECLARED } } } diff --git a/src/test/resources/1.6/valid-license-id-1.6.xml b/src/test/resources/1.6/valid-license-id-1.6.xml index 09da31cd6..1ab6b94f7 100644 --- a/src/test/resources/1.6/valid-license-id-1.6.xml +++ b/src/test/resources/1.6/valid-license-id-1.6.xml @@ -15,7 +15,7 @@ e8f33e424f3f4ed6db76a482fde1a5298970e442c531729119e37991884bdffab4f9426b7ee11fccd074eeda0634d71697d6f88a460dce0ac8d627a29f7d1282 - + Apache-2.0 diff --git a/src/test/resources/1.6/valid-license-licensing-1.6.textproto b/src/test/resources/1.6/valid-license-licensing-1.6.textproto index f5f787eca..f6079d483 100644 --- a/src/test/resources/1.6/valid-license-licensing-1.6.textproto +++ b/src/test/resources/1.6/valid-license-licensing-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-license-name-1.6.textproto b/src/test/resources/1.6/valid-license-name-1.6.textproto index 5dccc7ff4..15033c48b 100644 --- a/src/test/resources/1.6/valid-license-name-1.6.textproto +++ b/src/test/resources/1.6/valid-license-name-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-machine-learning-1.6.textproto b/src/test/resources/1.6/valid-machine-learning-1.6.textproto index 92c133a51..c91c462cb 100644 --- a/src/test/resources/1.6/valid-machine-learning-1.6.textproto +++ b/src/test/resources/1.6/valid-machine-learning-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.json b/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.json new file mode 100644 index 000000000..a7a0dbf55 --- /dev/null +++ b/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.json @@ -0,0 +1,65 @@ +{ + "bomFormat": "CycloneDX", + "specVersion": "1.6", + "serialNumber": "urn:uuid:ed5c5ba0-2be6-4b58-ac29-01a7fd375123", + "version": 1, + "components": [ + { + "bom-ref": "huggingface.co-meta-llama-Llama-2-7b", + "group": "meta-llama", + "name": "Llama-2-7b", + "type": "machine-learning-model", + "supplier": { + "name": "Hugging Face" + }, + "publisher": "meta", + "externalReferences": [ + { + "type": "distribution", + "url": "https://huggingface.co/meta-llama/Llama-2-7b" + } + ], + "modelCard": { + "considerations": { + "environmentalConsiderations": { + "energyConsumptions": [ + { + "activity": "training", + "energyProviders": [ + { + "description": "Meta data-center, US-East", + "organization": { + "name": "Meta", + "address": { + "country": "United States", + "region": "New Jersey", + "locality": "Newark" + } + }, + "energySource": "natural-gas", + "energyProvided": { + "value": 0.4, + "unit": "kWh" + } + } + ], + "activityEnergyCost": { + "value": 0.4, + "unit": "kWh" + }, + "co2CostEquivalent": { + "value": 31.22, + "unit": "tCO2eq" + }, + "co2CostOffset": { + "value": 31.22, + "unit": "tCO2eq" + } + } + ] + } + } + } + } + ] +} diff --git a/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.textproto b/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.textproto new file mode 100644 index 000000000..c045c9e60 --- /dev/null +++ b/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.textproto @@ -0,0 +1,57 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + +spec_version: "1.6" +version: 1 +serial_number: "urn:uuid:ed5c5ba0-2be6-4b58-ac29-01a7fd375123" +components { + type: CLASSIFICATION_MACHINE_LEARNING_MODEL + bom_ref: "huggingface.co-meta-llama-Llama-2-7b" + group: "meta-llama" + name: "Llama-2-7b" + publisher: "meta" + supplier { + name: "Hugging Face" + } + external_references { + type: EXTERNAL_REFERENCE_TYPE_DISTRIBUTION + url: "https://huggingface.co/meta-llama/Llama-2-7b" + } + modelCard { + considerations { + environmentalConsiderations { + energyConsumptions { + activity: ACTIVITY_TYPE_TRAINING + activityEnergyCost { + value: 0.4 + unit: ENERGY_MEASURE_UNIT_TYPE_KILOWATT_HOURS + } + energyProviders { + description: "Meta data-center, US-East" + organization { + name: "Meta" + address { + country: "United States" + region: "New Jersey" + locality: "Newark" + } + } + energySource: ENERGY_SOURCE_TYPE_NATURAL_GAS + energyProvided { + value: 0.4 + unit: ENERGY_MEASURE_UNIT_TYPE_KILOWATT_HOURS + } + } + co2CostEquivalent { + value: 31.22 + unit: CO2_MEASURE_UNIT_TYPE_TONNES_CO2_EQUIVALENT + } + co2CostOffset { + value: 31.22 + unit: CO2_MEASURE_UNIT_TYPE_TONNES_CO2_EQUIVALENT + } + } + } + } + } +} diff --git a/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.xml b/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.xml new file mode 100644 index 000000000..2b4938c19 --- /dev/null +++ b/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.xml @@ -0,0 +1,57 @@ + + + + + + Hugging Face + + meta + meta-llama + llama-2-7b + + + https://huggingface.co/meta-llama/Llama-2-7b + + + + + + + + training + + Meta data-center, US-East + + Meta +
+ United States + New Jersey + Newark +
+
+ natural-gas + + 0.4 + kWh + +
+ + 0.4 + kWh + + + 31.22 + tCO2eq + + + 31.22 + tCO2eq + +
+
+
+
+
+
+
+
diff --git a/src/test/resources/1.6/valid-metadata-author-1.6.textproto b/src/test/resources/1.6/valid-metadata-author-1.6.textproto index 4769ff6e1..0997b267a 100644 --- a/src/test/resources/1.6/valid-metadata-author-1.6.textproto +++ b/src/test/resources/1.6/valid-metadata-author-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-metadata-license-1.6.json b/src/test/resources/1.6/valid-metadata-license-1.6.json index 84b43e79e..3ee6eebfe 100644 --- a/src/test/resources/1.6/valid-metadata-license-1.6.json +++ b/src/test/resources/1.6/valid-metadata-license-1.6.json @@ -9,6 +9,14 @@ "license": { "id": "Apache-2.0" } + }, + { + "license": { + "name": "My License", + "text": { + "content": "My License Text" + } + } } ] }, diff --git a/src/test/resources/1.6/valid-metadata-license-1.6.textproto b/src/test/resources/1.6/valid-metadata-license-1.6.textproto index 18e43bb36..b761c2ece 100644 --- a/src/test/resources/1.6/valid-metadata-license-1.6.textproto +++ b/src/test/resources/1.6/valid-metadata-license-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" @@ -7,4 +10,12 @@ metadata { id: "Apache-2.0" } } + licenses { + license { + name: "My License" + text { + value: "My License Text" + } + } + } } diff --git a/src/test/resources/1.6/valid-metadata-license-1.6.xml b/src/test/resources/1.6/valid-metadata-license-1.6.xml index a319587af..e8c02a313 100644 --- a/src/test/resources/1.6/valid-metadata-license-1.6.xml +++ b/src/test/resources/1.6/valid-metadata-license-1.6.xml @@ -1,11 +1,17 @@ - + Apache-2.0 + + My License + My License Text + - + \ No newline at end of file diff --git a/src/test/resources/1.6/valid-metadata-lifecycle-1.6.textproto b/src/test/resources/1.6/valid-metadata-lifecycle-1.6.textproto index b61c3b5df..6b47e0eba 100644 --- a/src/test/resources/1.6/valid-metadata-lifecycle-1.6.textproto +++ b/src/test/resources/1.6/valid-metadata-lifecycle-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-metadata-manufacture-1.6.textproto b/src/test/resources/1.6/valid-metadata-manufacture-1.6.textproto index d5bc8f1b1..aa5b216f5 100644 --- a/src/test/resources/1.6/valid-metadata-manufacture-1.6.textproto +++ b/src/test/resources/1.6/valid-metadata-manufacture-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-metadata-manufacturer-1.6.textproto b/src/test/resources/1.6/valid-metadata-manufacturer-1.6.textproto index 00b1fcd76..1ec048566 100644 --- a/src/test/resources/1.6/valid-metadata-manufacturer-1.6.textproto +++ b/src/test/resources/1.6/valid-metadata-manufacturer-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-metadata-supplier-1.6.textproto b/src/test/resources/1.6/valid-metadata-supplier-1.6.textproto index fb675dbc1..fe4bd39c2 100644 --- a/src/test/resources/1.6/valid-metadata-supplier-1.6.textproto +++ b/src/test/resources/1.6/valid-metadata-supplier-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-metadata-timestamp-1.6.textproto b/src/test/resources/1.6/valid-metadata-timestamp-1.6.textproto index 4227eaf34..ea94ddb7f 100644 --- a/src/test/resources/1.6/valid-metadata-timestamp-1.6.textproto +++ b/src/test/resources/1.6/valid-metadata-timestamp-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-metadata-tool-1.6.textproto b/src/test/resources/1.6/valid-metadata-tool-1.6.textproto index 0e7eadcfa..872a92f24 100644 --- a/src/test/resources/1.6/valid-metadata-tool-1.6.textproto +++ b/src/test/resources/1.6/valid-metadata-tool-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-metadata-tool-deprecated-1.6.textproto b/src/test/resources/1.6/valid-metadata-tool-deprecated-1.6.textproto index 6de6bcae3..432b1eabc 100644 --- a/src/test/resources/1.6/valid-metadata-tool-deprecated-1.6.textproto +++ b/src/test/resources/1.6/valid-metadata-tool-deprecated-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-minimal-viable-1.6.textproto b/src/test/resources/1.6/valid-minimal-viable-1.6.textproto index 5ad41134a..08ca51bec 100644 --- a/src/test/resources/1.6/valid-minimal-viable-1.6.textproto +++ b/src/test/resources/1.6/valid-minimal-viable-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-patch-1.6.textproto b/src/test/resources/1.6/valid-patch-1.6.textproto index b444ab771..2dd43f6b9 100644 --- a/src/test/resources/1.6/valid-patch-1.6.textproto +++ b/src/test/resources/1.6/valid-patch-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-properties-1.6.textproto b/src/test/resources/1.6/valid-properties-1.6.textproto index 3f1c2ac6d..338706830 100644 --- a/src/test/resources/1.6/valid-properties-1.6.textproto +++ b/src/test/resources/1.6/valid-properties-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-release-notes-1.6.textproto b/src/test/resources/1.6/valid-release-notes-1.6.textproto index f2a79cd7e..2336c299d 100644 --- a/src/test/resources/1.6/valid-release-notes-1.6.textproto +++ b/src/test/resources/1.6/valid-release-notes-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" @@ -85,7 +88,7 @@ services { url: "http://api.partner.org/swagger" } releaseNotes: { - type: RELEASE_TYPE_MAJOR + type: "major" title: "My new release" featuredImage: "https://example.com/featured_image.png" socialImage: "https://example.com/social_image.png" diff --git a/src/test/resources/1.6/valid-saasbom-1.6.textproto b/src/test/resources/1.6/valid-saasbom-1.6.textproto index 31947dc84..c4ee72fcc 100644 --- a/src/test/resources/1.6/valid-saasbom-1.6.textproto +++ b/src/test/resources/1.6/valid-saasbom-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-service-1.6.textproto b/src/test/resources/1.6/valid-service-1.6.textproto index 465d596fd..545cd7061 100644 --- a/src/test/resources/1.6/valid-service-1.6.textproto +++ b/src/test/resources/1.6/valid-service-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-service-empty-objects-1.6.textproto b/src/test/resources/1.6/valid-service-empty-objects-1.6.textproto index 0cbb89708..1b20a3196 100644 --- a/src/test/resources/1.6/valid-service-empty-objects-1.6.textproto +++ b/src/test/resources/1.6/valid-service-empty-objects-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-standard-1.6.textproto b/src/test/resources/1.6/valid-standard-1.6.textproto index 65b90e2a0..4279ab77c 100644 --- a/src/test/resources/1.6/valid-standard-1.6.textproto +++ b/src/test/resources/1.6/valid-standard-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6", version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-tags-1.6.textproto b/src/test/resources/1.6/valid-tags-1.6.textproto index 0540a1115..a2df47d68 100644 --- a/src/test/resources/1.6/valid-tags-1.6.textproto +++ b/src/test/resources/1.6/valid-tags-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" diff --git a/src/test/resources/1.6/valid-vulnerability-1.6.textproto b/src/test/resources/1.6/valid-vulnerability-1.6.textproto index 6daca7b0f..5720fbb86 100644 --- a/src/test/resources/1.6/valid-vulnerability-1.6.textproto +++ b/src/test/resources/1.6/valid-vulnerability-1.6.textproto @@ -1,3 +1,6 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + spec_version: "1.6" version: 1 serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"