Skip to content

CycloneDX gives odd versions and PURLs #398

Closed

Description

@redaabdellah21

i installed cycloneDX for my python project, and ran these two commandes to generate the bom:
pip freeze > requirements.txt
cyclonedx-bom -r -i "MYPATH" --format json

it is giving me odd versions and PURLs (see example); and there is no dependency graph.

        {
            "type": "library",
            "bom-ref": "8ed7e17e-2d50-4cd8-badf-6935bc583cf3",
            "name": "PyYAML",
            "version": "6.0\u0a0d\u0d00",
            "purl": "pkg:pypi/[email protected]%E0%A8%8D%E0%B4%80"
        }

image
image

DT fails to compare with the latest version too, even though the component is in the latest version.

when i tried this command:
cyclonedx-bom -e --format json

it works better, but still no dependency Graph.

Activity

  1. changed the title [-]generating odd versions and PURLs[/-] [+]CycloneDX gives odd versions and PURLs[/+] on Aug 2, 2022
  2. madpah commented on Aug 2, 2022

    @madpah
    Collaborator

    Hi @redaabdellah21 - thanks for getting involved and reporting this behaviour.

    We have an open issue that is also similar to the lack of dependency tree generated by SBOMs in the manner you describe - (#391) as the metadata to understand how dependencies are actually being resolved is not something that is available directly in the metadata guaranteed to be available to this tool.

    With regards to the version number challenge you raise, this is very strange, and not something anyone has reported thus far.

    To help us triage this further can you please share:

    • Operating System you are running on (including version)
    • Python Version
    • Version of cyclonedx-python installed
    • The requirements.txt you are referencing

    Thanks!

  3. redaabdellah21 commented on Aug 3, 2022

    @redaabdellah21
    Author

    Hi @madpah thank you for your answer, here is the info you asked for:
    OS: windows 10 20H2
    python version : 3.10.4
    CycloneDX version: cyclonedx-bom 3.5.0
    cyclonedx-pyhton-lib 2.7.1
    requirements.txt:
    requirements.txt

    when i worked with the installed packages in the environment, it worked fine, but gave more components than those present in the requirements.txt. that is not the best thing to do, a user can be looking at a vulnerability that does not affect his project.

    Thanks again!

  4. added this to the 4.0.0 milestone on Nov 14, 2023
  5. linked a pull request that will close this issuefeat!: rewrite CLI and parsers #610on Nov 14, 2023
  6. self-assigned this
    on Dec 22, 2023
  7. linked a pull request that will close this issuefeat!: v4.0.0 #605on Dec 25, 2023
  8. jkowalleck commented on Dec 25, 2023

    @jkowalleck
    Member

    fixed by #605

  9. jkowalleck commented on Dec 25, 2023

    @jkowalleck
    Member

    This feature will be part of the next/upcoming major release.
    Changelog: see #605
    Install via: pip install cyclonedx-bom==4.0.0rc1

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions