diff --git a/src/cyclonedx/Commands/MergeCommand.cs b/src/cyclonedx/Commands/MergeCommand.cs index 7a96404..382a31e 100644 --- a/src/cyclonedx/Commands/MergeCommand.cs +++ b/src/cyclonedx/Commands/MergeCommand.cs @@ -101,8 +101,12 @@ public static async Task Merge(MergeCommandOptions options) } } - outputBom.Version = 1; - outputBom.SerialNumber = "urn:uuid:" + System.Guid.NewGuid().ToString(); + // Ensure that the new merged document has its own identity + // (new SerialNumber, Version=1, Timestamp...) and its Tools + // collection refers to this library and the program/tool + // like cyclonedx-cli which consumes it: + outputBom.BomMetadataUpdate(true); + outputBom.BomMetadataReferThisToolkit(); if (!outputToConsole) {