Skip to content

Spec 1.5 is not supported #324

@andreycha

Description

@andreycha

I'm using CLI to merge BOM files produces by several different CycloneDX tools. Some of them already generate BOM of version 1.5 and I merge throws an exception:

Unhandled exception: System.ArgumentException: Unsupported specification version: 1.5
        at CycloneDX.Models.Bom.set_SpecVersionString(String value)
        at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object , ReadStack& , Utf8JsonReader& )
        at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& , Type , JsonSerializerOptions , ReadStack& , T& )
        at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& , Type , JsonSerializerOptions , ReadStack& , T& )
        at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& , JsonSerializerOptions , ReadStack& )
        at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonConverter , Utf8JsonReader& , JsonSerializerOptions , ReadStack& )
        at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& , Boolean , ReadOnlySpan`1 , JsonSerializerOptions , ReadStack& , JsonConverter )
        at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState& , JsonReaderState& , ReadStack& , JsonConverter , JsonSerializerOptions )
        at System.Text.Json.JsonSerializer.ReadAllAsync[TValue](Stream , JsonTypeInfo , CancellationToken )
        at CycloneDX.Json.Serializer.DeserializeAsync(Stream jsonStream)
        at CycloneDX.Cli.CliUtils.InputBomHelper(String filename, CycloneDXBomFormat format)
        at CycloneDX.Cli.Commands.MergeCommand.InputBoms(IEnumerable`1 inputFilenames, CycloneDXBomFormat inputFormat, Boolean outputToConsole)
        at CycloneDX.Cli.Commands.MergeCommand.Merge(MergeCommandOptions options)
        at System.CommandLine.Invocation.CommandHandler.GetExitCodeAsync(Object value, InvocationContext context)
        at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
        at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()

CLI (or better to say cyclonedx-dotnet-library) supports only up to 1.4. Please consider adding support for 1.5. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions