Skip to content

[FEATURE] Add subcommand to compare 2 BOMs #528

Closed as not planned
Closed as not planned

Description

@madpah

As a BOM is typically a JSON or XML document, comparisons using tooling such as diff can be awkward or impractical given JSON and XML themselves as standards allow for ordering to be different (within schema limits) without the representation within the document being different.

For example, the following two samples are equivalent in XML, but would not compare equal if you used a tool such as diff:

<?xml version="1.0" encoding="UTF-8"?>
<book name="CycloneDX Is Epic">
    <chapter number="1" title="In the beginning..." />
    <chapter number="2" title="CycloneDX is just cool!" />
</book>
<?xml version="1.0" encoding="UTF-8"?>
<book name="CycloneDX Is Epic">
    <chapter number="2" title="CycloneDX is just cool!" />
    <chapter number="1" title="In the beginning..." />
</book>

This feature proposes adding a sub-command to cyclonedx-py to allow logical comparison of two BOM - perhaps looking like:

cyclonedx-py compare ./bom-1.xml ./bom-2.json

Activity

  1. added
    enhancement
    on Mar 7, 2023
  2. jkowalleck commented on Sep 10, 2023

    @jkowalleck
    Member

    why is this needed? this is already a feature of CycloneDX cli
    see https://github.com/CycloneDX/cyclonedx-cli

    i am tending to close this issue.

  3. added
    question
    on Sep 10, 2023
  4. jkowalleck commented on Sep 12, 2023

    @jkowalleck
    Member

    the feature to compare 2 BOMs already exists in cyclonedx-cli tool.
    not planned to re-implement it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions