-
Notifications
You must be signed in to change notification settings - Fork 59
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
[K9VULN-3872] Add --git-repository option to sbom/sarif upload #1570
base: master
Are you sure you want to change the base?
[K9VULN-3872] Add --git-repository option to sbom/sarif upload #1570
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 150 Passed, 0 Skipped, 45.67s Total duration (1m 36.88s time saved) |
1a34b57
to
657fe87
Compare
@@ -0,0 +1,26 @@ | |||
[core] |
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 did create a duplicate "gitconfig" file in sbom/fixtures
and sarif/fixtures
as I couldn't settle on where to put it in common directory. And it would keep ensuring that those commands have independent test set.
But if you feel strongly another way, please let me know and I would move it.
657fe87
to
93e3332
Compare
@@ -7,16 +7,20 @@ This command lets you upload SBOM files to the Datadog intake endpoint. | |||
|
|||
- CycloneDX 1.4 | |||
- CycloneDX 1.5 | |||
- CycloneDX 1.6 |
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.
lucky documentation change, we do support 1.6 too
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.
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.
A few non-breaking suggestions.
TL;DR
Adding
--git-repository
option support todatadog-ci sbom upload
anddatadog-ci sarif upload
.What
We have users complaining about CI integration of
datadog-ci
to generate SBOM for repository which do not report the correct git information.And why?
Currently, it is not clear how the
datadog-ci sbom upload
command gets Git context. It currently does:--no-ci-tags
option)DD_GIT_*
variables)Currently users have two options to have the correct Git values when running the
upload
command from CI:--no-ci-tags
DD_
variables.The current workaround is to override
DD_
variablesit would be better if we could specify a repository while still read CI variables (not related to GIT info). New priority would be:
--no-ci-tags
option)--git-repository
option)DD_GIT_*
variables)How?
We give user the ability to pass an extra parameter
--git-repository
which we will use to initialize the directory from which we read the git environment variables.Review checklist