-
Notifications
You must be signed in to change notification settings - Fork 6
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
Merge multiple dt projects #99
Merge multiple dt projects #99
Conversation
cmd/dtsmble.go
Outdated
@@ -0,0 +1,202 @@ | |||
// Copyright 2023 Interlynk.io |
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.
Here is what i would like, sbomasm has two commands
- assemble
- edit
we want to provide both these functionalities to dt. I would classify DT as an input-output source hence we should augment the current commands to take in DT related information. In sbomqs i made the mistake of making it a separate command.
e.g
This command indicates that dt is in input source from where to get the input files from project-ids. We should allow mixing of project-ids and file-names. If file-names are provided that means they are local files. The output assembled file is now stored in the file-system.
sbomasm assemble -n "mega cdx app" -v "1.0.0" -t "application" --dt-hosturl"http://localhost:8080" --dt-api-key "asadasdas" -o final-product.cdx.json sbom1.json <project-id1> <project-id2> <project-id3> .....
The following command is the same as above except the output is pushed back to DT
sbomasm assemble -n "mega cdx app" -v "1.0.0" -t "application" --dt-hosturl"http://localhost:8080" --dt-api-key "asadasdas" --dt-output <project-id-5> sbom1.json <project-id1> <project-id2> <project-id3> .....
Now this can also be replicated to edit
command at a later date.
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.
added those changes
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.
as mentioned below in the comments.
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.
Some basic changes else looks good.
cmd/edit_dt.go
Outdated
@@ -0,0 +1,212 @@ | |||
package cmd |
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.
Lets not do edit for this release. I need to think more about this.
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.
okay for this release our main focus is dt assemble and not dt edit, right ?
|
||
return m.writeSBOM() | ||
} | ||
|
||
func (m *merge) uploadSBOM() error { |
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.
Please remove all debug stmts
Signed-off-by: Vivek Kumar Sahu <[email protected]> add dtAssemble cmd parameters Signed-off-by: Vivek Kumar Sahu <[email protected]> add support for dtAssemble Command Signed-off-by: Vivek Kumar Sahu <[email protected]> add test Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
Signed-off-by: Vivek Kumar Sahu <[email protected]>
61f2565
to
29984a8
Compare
closes #61
Add support for merging SBOMs directly using Project IDs from Dependency Track using
sbomasm dtAssemble
command.dt assemble command
To upload the generated assembled SBOM:
Mixing of local files and project IDs:
dt edit command
dt assemble help
and
dt edit command help