Skip to content

Commit

Permalink
Adapt test resources to ensure consistency between xml and json
Browse files Browse the repository at this point in the history
Signed-off-by: andreas hilti <[email protected]>
  • Loading branch information
andreas-hilti committed Aug 31, 2024
1 parent 06f2e77 commit ea066b5
Show file tree
Hide file tree
Showing 25 changed files with 173 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</contact>
</organization>
</annotator>
<timestamp>2020-04-07T07:01:00Z</timestamp>
<timestamp>2022-01-01T00:00:00Z</timestamp>
<text>This is a sample annotation made by an organization</text>
</annotation>
<annotation bom-ref="annotation-2">
Expand All @@ -35,8 +35,8 @@
<phone>800-555-1212</phone>
</individual>
</annotator>
<timestamp>2020-04-07T07:01:00Z</timestamp>
<text>This is a sample annotation made by an person</text>
<timestamp>2022-01-01T00:00:00Z</timestamp>
<text>This is a sample annotation made by a person</text>
</annotation>
<annotation bom-ref="annotation-3">
<subjects>
Expand All @@ -48,7 +48,7 @@
<version>9.1.2</version>
</component>
</annotator>
<timestamp>2020-04-07T07:01:00Z</timestamp>
<timestamp>2022-01-01T00:00:00Z</timestamp>
<text>This is a sample annotation made by a component</text>
</annotation>
<annotation bom-ref="annotation-4">
Expand Down Expand Up @@ -76,11 +76,11 @@
<authenticated>true</authenticated>
<x-trust-boundary>true</x-trust-boundary>
<data>
<classification flow="bi-directional">pubic</classification>
<classification flow="bi-directional">public</classification>
</data>
</service>
</annotator>
<timestamp>2020-04-07T07:01:00Z</timestamp>
<timestamp>2022-01-01T00:00:00Z</timestamp>
<text>This is a sample annotation made by a service</text>
</annotation>
</annotations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</component>
<component type="library" bom-ref="pkg:maven/acme/[email protected]">
<name>Acme Library</name>
<version>2.0</version>
<version>3.0</version>
<purl>pkg:maven/acme/[email protected]</purl>
</component>
</components>
Expand Down Expand Up @@ -49,9 +49,9 @@
</composition>
<composition>
<aggregate>incomplete_first_party_only</aggregate>
<assemblies>
<assembly ref="vulnerability-1"/>
</assemblies>
<vulnerabilities>
<vulnerability ref="vulnerability-1"/>
</vulnerabilities>
</composition>
</compositions>
<vulnerabilities>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
</cryptoProperties>
</component>
<component type="library" bom-ref="crypto-library">
<name>Crypto Library</name>
<name>Crypto library</name>
<version>1.0.0</version>
</component>
<component type="library" bom-ref="some-library">
<name>Some Library</name>
<name>Some library</name>
<version>1.0.0</version>
</component>
</components>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.6">
<components>
<component type="library" bom-ref="library-a">
<name>acme-library-a</name>
<name>library-a</name>
<version>1.0.0</version>
</component>
<component type="library" bom-ref="library-b">
<name>acme-library-b</name>
<name>library-b</name>
<version>1.0.0</version>
</component>
<component type="library" bom-ref="library-c">
<name>acme-library-b</name>
<name>library-c</name>
<version>1.0.0</version>
</component>
</components>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.6">
<components>
<component type="library">
<publisher>Acme Inc</publisher>
<group>org.example</group>
<name>mylibrary</name>
<version>1.0.0</version>
Expand All @@ -14,7 +15,7 @@
<url>https://example.org/support/sbom/portal-server/1.0.0</url>
<comment>An external SBOM that describes what this component includes</comment>
<hashes>
<hash alg="SHA-256">f498a8ff2dd007e29c2074f5e4b01a9a01775c3ff3aeaf6906ea503bc5791b7b</hash>
<hash alg="SHA-256">708f1f53b41f11f02d12a11b1a38d2905d47b099afc71a0f1124ef8582ec7313</hash>
</hashes>
</reference>
<reference type="documentation">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
}
],
"timeStart": "2023-01-01T00:00:00+00:00",
"timeEnd": "2023-01-01T00:00:00+10:00",
"timeEnd": "2023-01-01T00:00:10+00:00",
"workspaces": [
{
"bom-ref": "workspace-1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ formulation: [
nanos: 0
}
timeEnd {
seconds: 1672495200
seconds: 1672531210
nanos: 0
}
workspaces: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
</workspace>
</workspaces>
<runtimeTopology>
<dependency ref="component-1">
<dependency ref="component-2" />
<dependency ref="task-1">
<dependency ref="task-2" />
</dependency>
</runtimeTopology>
</task>
Expand All @@ -84,11 +84,11 @@
</dependency>
</taskDependencies>
<taskTypes>
<taskType>clean</taskType>
<taskType>clone</taskType>
<taskType>build</taskType>
</taskTypes>
<trigger bom-ref="trigger-2">
<uid>trigger-uid-1</uid>
<uid>trigger-uid-2</uid>
<name>My trigger</name>
<description>Description here</description>
<resourceReferences>
Expand All @@ -101,7 +101,7 @@
<uid>event-1</uid>
<description>Description here</description>
<timeReceived>2023-01-01T00:00:00+00:00</timeReceived>
<data>FooBar</data>
<data>Foo/Bar</data>
<source>
<ref>component-g</ref>
</source>
Expand Down Expand Up @@ -207,9 +207,9 @@
</output>
</outputs>
<timeStart>2023-01-01T00:00:00+00:00</timeStart>
<timeEnd>2023-01-01T00:00:00+00:00</timeEnd>
<timeEnd>2023-01-01T00:00:10+00:00</timeEnd>
<workspaces>
<workspace bom-ref="workspace-2">
<workspace bom-ref="workspace-1">
<uid>workspace-1</uid>
<name>My workspace</name>
<aliases>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,39 @@
"version": 1,
"components": [
{
"type": "library",
"type": "Application",
"publisher": "Acme Inc",
"group": "com.acme",
"name": "tomcat-catalina",
"version": "9.0.14",
"description": "Modified version of Apache Catalina",
"scope": "required",
"hashes": [
{
"alg": "MD5",
"content": "3942447fac867ae5cdb3229b658f4d48"
},
{
"alg": "SHA-1",
"content": "e6b1000b94e835ffd37f4c6dcbdad43f4b48a02a"
},
{
"alg": "SHA-256",
"content": "f498a8ff2dd007e29c2074f5e4b01a9a01775c3ff3aeaf6906ea503bc5791b7b"
},
{
"alg": "SHA-512",
"content": "e8f33e424f3f4ed6db76a482fde1a5298970e442c531729119e37991884bdffab4f9426b7ee11fccd074eeda0634d71697d6f88a460dce0ac8d627a29f7d1282"
}
],
"licenses": [
{
"expression": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
"acknowledgement": "declared",
"bom-ref": "my-license"
}
]
],
"purl": "pkg:maven/com.acme/[email protected]?packaging=jar"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,32 @@ spec_version: "1.6"
version: 1
serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"
components {
type: CLASSIFICATION_LIBRARY
type: CLASSIFICATION_APPLICATION
publisher: "Acme Inc"
group: "com.acme"
name: "tomcat-catalina"
version: "9.0.14"
description: "Modified version of Apache Catalina"
scope: SCOPE_REQUIRED
hashes {
alg: HASH_ALG_MD_5
value: "3942447fac867ae5cdb3229b658f4d48"
}
hashes {
alg: HASH_ALG_SHA_1
value: "e6b1000b94e835ffd37f4c6dcbdad43f4b48a02a"
}
hashes {
alg: HASH_ALG_SHA_256
value: "f498a8ff2dd007e29c2074f5e4b01a9a01775c3ff3aeaf6906ea503bc5791b7b"
}
hashes {
alg: HASH_ALG_SHA_512
value: "e8f33e424f3f4ed6db76a482fde1a5298970e442c531729119e37991884bdffab4f9426b7ee11fccd074eeda0634d71697d6f88a460dce0ac8d627a29f7d1282"
}
licenses {
expression: "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0"
acknowledgement: LICENSE_ACKNOWLEDGEMENT_ENUMERATION_DECLARED
}
purl: "pkg:maven/com.acme/[email protected]?packaging=jar"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
<hash alg="SHA-512">e8f33e424f3f4ed6db76a482fde1a5298970e442c531729119e37991884bdffab4f9426b7ee11fccd074eeda0634d71697d6f88a460dce0ac8d627a29f7d1282</hash>
</hashes>
<licenses>
<expression bom-ref="my-license" acknowledgement="declared">
EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
</expression>
<expression bom-ref="my-license" acknowledgement="declared">EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0</expression>
</licenses>
<purl>pkg:maven/com.acme/[email protected]?packaging=jar</purl>
</component>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,31 @@
"version": 1,
"components": [
{
"type": "library",
"type": "Application",
"publisher": "Acme Inc",
"group": "com.acme",
"name": "tomcat-catalina",
"version": "9.0.14",
"description": "Modified version of Apache Catalina",
"scope": "required",
"hashes": [
{
"alg": "MD5",
"content": "3942447fac867ae5cdb3229b658f4d48"
},
{
"alg": "SHA-1",
"content": "e6b1000b94e835ffd37f4c6dcbdad43f4b48a02a"
},
{
"alg": "SHA-256",
"content": "f498a8ff2dd007e29c2074f5e4b01a9a01775c3ff3aeaf6906ea503bc5791b7b"
},
{
"alg": "SHA-512",
"content": "e8f33e424f3f4ed6db76a482fde1a5298970e442c531729119e37991884bdffab4f9426b7ee11fccd074eeda0634d71697d6f88a460dce0ac8d627a29f7d1282"
}
],
"licenses": [
{
"license": {
Expand All @@ -19,7 +39,8 @@
"bom-ref": "my-license"
}
}
]
],
"purl": "pkg:maven/com.acme/[email protected]?packaging=jar"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,35 @@ spec_version: "1.6"
version: 1
serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"
components {
type: CLASSIFICATION_LIBRARY
type: CLASSIFICATION_APPLICATION
publisher: "Acme Inc"
group: "com.acme"
name: "tomcat-catalina"
version: "9.0.14"
description: "Modified version of Apache Catalina"
scope: SCOPE_REQUIRED
hashes {
alg: HASH_ALG_MD_5
value: "3942447fac867ae5cdb3229b658f4d48"
}
hashes {
alg: HASH_ALG_SHA_1
value: "e6b1000b94e835ffd37f4c6dcbdad43f4b48a02a"
}
hashes {
alg: HASH_ALG_SHA_256
value: "f498a8ff2dd007e29c2074f5e4b01a9a01775c3ff3aeaf6906ea503bc5791b7b"
}
hashes {
alg: HASH_ALG_SHA_512
value: "e8f33e424f3f4ed6db76a482fde1a5298970e442c531729119e37991884bdffab4f9426b7ee11fccd074eeda0634d71697d6f88a460dce0ac8d627a29f7d1282"
}
licenses {
license {
id: "Apache-2.0"
acknowledgement: LICENSE_ACKNOWLEDGEMENT_ENUMERATION_DECLARED
bom_ref: "my-license"
}
}
purl: "pkg:maven/com.acme/[email protected]?packaging=jar"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,40 @@
"version": 1,
"components": [
{
"type": "library",
"type": "Application",
"publisher": "Acme Inc",
"group": "com.acme",
"name": "tomcat-catalina",
"version": "9.0.14",
"description": "Modified version of Apache Catalina",
"scope": "required",
"hashes": [
{
"alg": "MD5",
"content": "3942447fac867ae5cdb3229b658f4d48"
},
{
"alg": "SHA-1",
"content": "e6b1000b94e835ffd37f4c6dcbdad43f4b48a02a"
},
{
"alg": "SHA-256",
"content": "f498a8ff2dd007e29c2074f5e4b01a9a01775c3ff3aeaf6906ea503bc5791b7b"
},
{
"alg": "SHA-512",
"content": "e8f33e424f3f4ed6db76a482fde1a5298970e442c531729119e37991884bdffab4f9426b7ee11fccd074eeda0634d71697d6f88a460dce0ac8d627a29f7d1282"
}
],
"licenses": [
{
"license": {
"name": "Apache License 2.0",
"bom-ref": "my-license"
}
}
]
],
"purl": "pkg:maven/com.acme/[email protected]?packaging=jar"
}
]
}
Loading

0 comments on commit ea066b5

Please sign in to comment.