-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- adds manufacturer field to Metadata and Component - adds authors field to Component - adds roundtrip testdata for above Signed-off-by: Tim Pickles <tim.pickles@snyk.io>
- Loading branch information
Showing
15 changed files
with
335 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
testdata/snapshots/cyclonedx-go-TestRoundTripJSON-func1-valid-component-authors.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
"version": 1, | ||
"components": [ | ||
{ | ||
"type": "application", | ||
"authors": [ | ||
{ | ||
"name": "Anthony Edward Stark", | ||
"email": "ironman@example.org", | ||
"phone": "555-212-970-4133" | ||
}, | ||
{ | ||
"name": "Peter Benjamin Parker", | ||
"email": "spiderman@example.org" | ||
} | ||
], | ||
"name": "Acme Application", | ||
"version": "9.1.1" | ||
} | ||
] | ||
} | ||
|
26 changes: 26 additions & 0 deletions
26
testdata/snapshots/cyclonedx-go-TestRoundTripJSON-func1-valid-component-manufacturer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
"version": 1, | ||
"components": [ | ||
{ | ||
"type": "application", | ||
"manufacturer": { | ||
"name": "Acme, Inc.", | ||
"url": [ | ||
"https://example.com" | ||
], | ||
"contact": [ | ||
{ | ||
"name": "Acme Professional Services", | ||
"email": "professional.services@example.com" | ||
} | ||
] | ||
}, | ||
"name": "Acme Application", | ||
"version": "9.1.1" | ||
} | ||
] | ||
} | ||
|
22 changes: 22 additions & 0 deletions
22
testdata/snapshots/cyclonedx-go-TestRoundTripJSON-func1-valid-metadata-manufacturer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
"version": 1, | ||
"metadata": { | ||
"manufacturer": { | ||
"name": "Acme, Inc.", | ||
"url": [ | ||
"https://example.com" | ||
], | ||
"contact": [ | ||
{ | ||
"name": "Acme Professional Services", | ||
"email": "professional.services@example.com" | ||
} | ||
] | ||
} | ||
}, | ||
"components": [] | ||
} | ||
|
20 changes: 20 additions & 0 deletions
20
testdata/snapshots/cyclonedx-go-TestRoundTripXML-func1-valid-component-authors.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.6" serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1"> | ||
<components> | ||
<component type="application"> | ||
<authors> | ||
<author> | ||
<name>Anthony Edward Stark</name> | ||
<email>ironman@example.org</email> | ||
<phone>555-212-970-4133</phone> | ||
</author> | ||
<author> | ||
<name>Peter Benjamin Parker</name> | ||
<email>spiderman@example.org</email> | ||
</author> | ||
</authors> | ||
<name>Acme Application</name> | ||
<version>9.1.1</version> | ||
</component> | ||
</components> | ||
</bom> |
17 changes: 17 additions & 0 deletions
17
testdata/snapshots/cyclonedx-go-TestRoundTripXML-func1-valid-component-manufacturer.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.6" serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1"> | ||
<components> | ||
<component type="application"> | ||
<manufacturer> | ||
<name>Acme, Inc.</name> | ||
<url>https://example.com</url> | ||
<contact> | ||
<name>Acme Professional Services</name> | ||
<email>professional.services@example.com</email> | ||
</contact> | ||
</manufacturer> | ||
<name>Acme Application</name> | ||
<version>9.1.1</version> | ||
</component> | ||
</components> | ||
</bom> |
13 changes: 13 additions & 0 deletions
13
testdata/snapshots/cyclonedx-go-TestRoundTripXML-func1-valid-metadata-manufacturer.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.6" serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1"> | ||
<metadata> | ||
<manufacturer> | ||
<name>Acme, Inc.</name> | ||
<url>https://example.com</url> | ||
<contact> | ||
<name>Acme Professional Services</name> | ||
<email>professional.services@example.com</email> | ||
</contact> | ||
</manufacturer> | ||
</metadata> | ||
</bom> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
"version": 1, | ||
"components": [ | ||
{ | ||
"type": "application", | ||
"name": "Acme Application", | ||
"version": "9.1.1", | ||
"authors": [ | ||
{ | ||
"name": "Anthony Edward Stark", | ||
"phone": "555-212-970-4133", | ||
"email": "ironman@example.org" | ||
}, | ||
{ | ||
"name": "Peter Benjamin Parker", | ||
"email": "spiderman@example.org" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.6"> | ||
<components> | ||
<component type="application"> | ||
<authors> | ||
<author> | ||
<name>Anthony Edward Stark</name> | ||
<email>ironman@example.org</email> | ||
<phone>555-212-970-4133</phone> | ||
</author> | ||
<author> | ||
<name>Peter Benjamin Parker</name> | ||
<email>spiderman@example.org</email> | ||
</author> | ||
</authors> | ||
<name>Acme Application</name> | ||
<version>9.1.1</version> | ||
</component> | ||
</components> | ||
</bom> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", | ||
"version": 1, | ||
"components": [ | ||
{ | ||
"type": "application", | ||
"name": "Acme Application", | ||
"version": "9.1.1", | ||
"manufacturer": { | ||
"name": "Acme, Inc.", | ||
"url": [ | ||
"https://example.com" | ||
], | ||
"contact": [ | ||
{ | ||
"name": "Acme Professional Services", | ||
"email": "professional.services@example.com" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0"?> | ||
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.6"> | ||
<components> | ||
<component type="application"> | ||
<manufacturer> | ||
<name>Acme, Inc.</name> | ||
<url>https://example.com</url> | ||
<contact> | ||
<name>Acme Professional Services</name> | ||
<email>professional.services@example.com</email> | ||
</contact> | ||
</manufacturer> | ||
<name>Acme Application</name> | ||
<version>9.1.1</version> | ||
</component> | ||
</components> | ||
</bom> |
Oops, something went wrong.