-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Possible to include commit identifier in BOM? #427
Comments
did you see in CycloneDX schema any location that would be ok to record that type of info? |
or even pedigree as in #448 https://cyclonedx.org/docs/1.5/json/#metadata_component_pedigree |
Hello! I had intended to just stick it in |
yes, never seen commit info in any of examples https://github.com/CycloneDX/bom-examples I suppose this would deserve a discussion on CycloneDX Slack general channel |
@io7m @hboutemy Is it possible to construct the full commit URL ? (
@stevespringett, @coderpatros , @jkowalleck, @prabhu,@nscuro, @tsjensen Could you please let us know your thoughts on this? |
The fact that github allows accessing a certain git commit is just a happy little accident, nothing you should make a general assumption from. Furthermore, a VCS may run cleanup jobs that remove unattached/orphan nodes. If you really must do it like this, and you knew the repository URL, then it would be possible to annotate like so: {
"url": "git+https://github.com/CycloneDX/cyclonedx-maven-plugin.git#a964c6e80164914e48207239cef29e722a6e87af",
"type": "vcs"
} when adding such URLS, be aware, that they might include authentication(username/password) like and it goes one step further with PackageURLs - they allow a qualifier for this purpose:
Formulations might be used. |
since the original request talks about a build number, and build numbers are usually added to the actual version identifiers in form of I'd assume the appropriate thing would be, that the "build number" is added to CycloneDX document as {
"metadata": {
"component" : {
"name": "cyclonedx-maven-plugin"
"version": "1.33.7+a964c6e80164914e48207239cef29e722a6e87af"
},
...
},
...
} @io7m where do you want to see your build number in the CDX document? |
@jkowalleck I honestly have no preference. I was just looking at this because:
Therefore, I thought it would probably be a good idea if someone could look in the BOM and then work backwards from the commit ID to determine the exact original sources that produced the build. I realize the BOM also provides this information (via hashes of binaries), but I thought an extra layer of assurance would be nice to have. |
I agree with @io7m's notion that the VCS hash is useful metadata. Every commit might influence the SBOM of a project. In fact, I think we even need the information of whether the Git workspace was clean, because otherwise again the SBOM might have been changed in relation to the latest commit. In order to address this, we defined |
But thinking further, I believe that eventually, what we want is a But it's not like we're in a lot of pain over this at the moment, so we can discuss when the time comes. 🙂 |
A slightly more basic issue is that there doesn't actually seem to be a way to include extra properties of any kind in the BOM using the |
the plugin has focused until now on Maven dependencies = CycloneDX this commit identifier is about more precisely describing the project being built on git commit, I feel that developers are trying to replace build tool: |
Hello!
Via the
buildnumber-maven-plugin
, I have access to the SCM revision that was used to produce whatever is in the current BOM. The revision is accessible via the${buildNumber}
property.Is there some way to get this information into the produced BOM? I can't see an obvious way to include properties in the BOM, or to include that information in any other way...
The text was updated successfully, but these errors were encountered: