forked from DependencyTrack/dependency-track
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit for addressing Issue DependencyTrack#2737 Signed-off-by: Melba Lopez <[email protected]> * Adding supplier support with fix for organizational entity; addressing Issue DependencyTrack#2737 Signed-off-by: Melba Lopez <[email protected]> * Added a persistent column for supplier, bom upload processing for supplier, still tweaking how to add supplier contact info; addressing Issue DependencyTrack#2737 Signed-off-by: Melba Lopez <[email protected]> * Updates per nscuro comments. Co-authored by: Melba Lopez <[email protected]> Co-authored by: nscuro <[email protected]> Signed-off-by: Melba Lopez <[email protected]> * Update Component.java - missing ; Signed-off-by: Melba Lopez <[email protected]> * Update ModelConverter.java Putting back code (mouse is acting up on me and accidentally deleted code) Signed-off-by: Melba Lopez <[email protected]> --------- Signed-off-by: Melba Lopez <[email protected]>
- Loading branch information
1 parent
593ab00
commit 237d839
Showing
5 changed files
with
118 additions
and
3 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
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 |
---|---|---|
|
@@ -141,6 +141,13 @@ public void informTest() throws Exception { | |
assertThat(components).hasSize(1); | ||
|
||
final Component component = components.get(0); | ||
|
||
assertThat(component.getSupplier().getName()).isEqualTo("Foo Incorporated"); /*Issue #2373, #2737 - Adding support for Supplier*/ | ||
assertThat(component.getSupplier().getUrls()).isEqualTo("https://foo.bar.com"); | ||
assertThat(component.getSupplier().getContacts().get(0).getName()).isEqualTo("Foo Jr."); | ||
assertThat(component.getSupplier().getContacts().get(0).getEmail()).isEqualTo("[email protected]"); | ||
assertThat(component.getSupplier().getContacts().get(0).getPhone()).isEqualTo("123-456-7890"); | ||
|
||
assertThat(component.getAuthor()).isEqualTo("Sometimes this field is long because it is composed of a list of authors......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................"); | ||
assertThat(component.getPublisher()).isEqualTo("Example Incorporated"); | ||
assertThat(component.getGroup()).isEqualTo("com.example"); | ||
|
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 |
---|---|---|
|
@@ -2,6 +2,17 @@ | |
<bom xmlns="http://cyclonedx.org/schema/bom/1.4" version="1"> | ||
<metadata> | ||
<component type="application" bom-ref="acme"> | ||
<supplier> | ||
<name>Foo Incorporated</name> | ||
<url>https://foo.bar.com</url> | ||
<contact> | ||
<contact> | ||
<name>Foo Jr.</name> | ||
<email>[email protected]</email> | ||
<phone>123-456-7890</phone> | ||
</contact> | ||
</contact> | ||
</supplier> | ||
<publisher>DependencyTrack</publisher> | ||
<name>Acme example</name> | ||
<externalReferences> | ||
|
@@ -19,10 +30,43 @@ | |
</reference> | ||
</externalReferences> | ||
</component> | ||
<manufacture> | ||
<name>Foo Incorporated</name> | ||
<url>https://foo.bar.com</url> | ||
<contact> | ||
<contact> | ||
<name>Foo Sr.</name> | ||
<email>[email protected]</email> | ||
<phone>800-123-4567</phone> | ||
</contact> | ||
</contact> | ||
</manufacture> | ||
<supplier> | ||
<name>Foo Incorporated</name> | ||
<url>https://foo.bar.com</url> | ||
<contact> | ||
<contact> | ||
<name>Foo Jr.</name> | ||
<email>[email protected]</email> | ||
<phone>123-456-7890</phone> | ||
</contact> | ||
</contact> | ||
</supplier> | ||
</metadata> | ||
<components> | ||
<component type="application"> | ||
<author>Sometimes this field is long because it is composed of a list of authors......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................</author> | ||
<supplier> | ||
<name>Foo Incorporated</name> | ||
<url>https://foo.bar.com</url> | ||
<contact> | ||
<contact> | ||
<name>Foo Jr.</name> | ||
<email>[email protected]</email> | ||
<phone>123-456-7890</phone> | ||
</contact> | ||
</contact> | ||
</supplier> | ||
<publisher>Example Incorporated</publisher> | ||
<group>com.example</group> | ||
<name>xmlutil</name> | ||
|