-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(UI/REST): CycloneDX SBOM Importer & Exporter #2015
feat(UI/REST): CycloneDX SBOM Importer & Exporter #2015
Conversation
01d47e1
to
c9ec5a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting some minor changes
backend/src-common/src/main/java/org/eclipse/sw360/cyclonedx/CycloneDxBOMExporter.java
Outdated
Show resolved
Hide resolved
public static String getSW360Version() { | ||
MavenXpp3Reader reader = new MavenXpp3Reader(); | ||
try (InputStreamReader iStreamReader = new InputStreamReader( | ||
SW360Utils.class.getResourceAsStream("/META-INF/maven/org.eclipse.sw360/datahandler/pom.xml"))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly try to remove the hard-coded path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made in configurable via sw360.properties
: datahandler.pom.file.path
...ce-server/src/main/java/org/eclipse/sw360/rest/resourceserver/project/ProjectController.java
Outdated
Show resolved
Hide resolved
c9ec5a0
to
9beded0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import and export is working fine
Signed-off-by: afsahsyeda <[email protected]> Signed-off-by: akapti <[email protected]>
9beded0
to
1bf1576
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good
This feature enables the possibility to
import
andexport
aCycloneDx SBOM
to and from SW360 respectively.Issue: #1146
Suggest Reviewer
@ag4ums @smrutis1
How To Test?
XML
andJSON
format of CycloneDXSBOM
is supported for import and export.CycloneDx SBOM
will createComponents
andReleases
inSW360 Project
as per the list ofComponents
present inSBOM
.Project
as attachment of typeSBOM
.SBOM-FILE-NAME_ImportStatus_Creation-Date-Time.json
containing import relevant information likeComponents
count,Release
count,Components
with missingname
orversion
etc.Project Home page
orProject Details page
.sbom.import.export.access.usergroup
insw360.properties
file. Default value isUSER
.SBOM
should be imported fromProject Home page
if you want to create a newProject
based onComponent
present inmetadata
tag ofSBOM
and link all theComponents
to the newly createdProject
.fail
if there is already an existingProject
with same name and version asComponent
present in SBOMmetadata
tag.SBOM
fromProject Home page
.SBOM
should be imported fromProject Details page
if you want to update the existingProject
with new or updatedComponents
fromSBOM
.fail
if existingProject
name and version is not the same asComponent
present in SBOMmetadata
tag.write
access toProject
should be able to import an SBOM fromProject Home page
.Project Details page
only.Export SBOM
button will be shown if and only if there is at least one directly linkedRelease
orsub-Project
.CycloneDx SBOM
fromComponents
andReleases
present inSW360 Project
.Releases
of theProject
are included while exporting anSBOM
.Releases
ofSub-Projects
in the exportedSBOM
, user should check theInclude releases from sub-projects in exported sbom?
checkbox.Linked Release
of aRelease
will always be ignored while exportingSBOM
.SBOM
is available in this PR.SBOM
will be a added later as a part of different PR.PROJECT HOME PAGE
:PROJECT DETAILS PAGE
:Checklist
Must:
Signed-off-by: afsahsyeda [email protected]
Signed-off-by: akapti [email protected]