CycloneDX / cyclonedx-buildroot

Create CycloneDX Software Bill of Materials (SBOM) for Buildroot projects
https://cyclonedx.org
Apache License 2.0
10 stars 4 forks source link

Current branches are not working #8

Closed azsde closed 1 year ago

azsde commented 1 year ago

Hello,

The current master doesn't seem to work :

Output BOM: export
SBOM Component Name: Test
SBOM Component Version: 1R3-RCX
Traceback (most recent call last):
  File "C:\Users\azsde\Downloads\cyclonedx-buildroot\generateBuildrootSBOM.py", line 119, in <module>
    main()
  File "C:\Users\azsde\Downloads\cyclonedx-buildroot\generateBuildrootSBOM.py", line 92, in main
    br_parser.Component(name=args.input_name, version=args.component_version,
TypeError: Component.__init__() got an unexpected keyword argument 'type'

When I try to use the latest python_executable branch it doesn't work either:

Input file: C:\Users\azsde\Downloads\manifest.csv
Output BOM: export
SBOM Component Name: Test
SBOM Component Version: 1R3-RCX
Traceback (most recent call last):
  File "C:\Users\azsde\Downloads\cyclonedx-buildroot\generateBuildrootSBOM.py", line 114, in <module>
    main()
  File "C:\Users\azsde\Downloads\cyclonedx-buildroot\generateBuildrootSBOM.py", line 93, in main
    new_bom = create_buildroot_sbom(args, br_bom)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\azsde\Downloads\cyclonedx-buildroot\generateBuildrootSBOM.py", line 53, in create_buildroot_sbom
    next_component = cyclonedx.model.component.Component(name=row['PACKAGE'],
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Component.__init__() got an unexpected keyword argument 'package_url_type'

When I update the code so that package_url_type is updated to purl, I get the following error:

Input file: C:\Users\azsde\Downloads\cyclonedx-buildroot\manifest.csv
Output BOM: export
SBOM Component Name: Test
SBOM Component Version: 1R3-RCX
Traceback (most recent call last):
  File "C:\Users\azsde\Downloads\cyclonedx-buildroot\cyclonedx-buildroot\generateBuildrootSBOM.py", line 114, in <module>
    main()
  File "C:\Users\azsde\Downloads\cyclonedx-buildroot\cyclonedx-buildroot\generateBuildrootSBOM.py", line 93, in main
    new_bom = create_buildroot_sbom(args, br_bom)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\azsde\Downloads\cyclonedx-buildroot\cyclonedx-buildroot\generateBuildrootSBOM.py", line 58, in create_buildroot_sbom
    br_bom_local.add_component(component=next_component)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Bom' object has no attribute 'add_component'. Did you mean: 'has_component'?

I installed all depencies as defined in requirement.txt

Should it be updated maybe ?

ptdropper commented 1 year ago

Hi Azsde I am working on a solution but running into implementation issues. I ran into differences between the cyclonedx spec 1.3 and 1.4 on field names. I am working on it.

On Tue, Jun 6, 2023 at 8:33 AM Azsde @.***> wrote:

Hello,

The current master doesn't seem to work :

Output BOM: export SBOM Component Name: Test SBOM Component Version: 1R3-RCX Traceback (most recent call last): File "C:\Users\azsde\Downloads\cyclonedx-buildroot\generateBuildrootSBOM.py", line 119, in main() File "C:\Users\azsde\Downloads\cyclonedx-buildroot\generateBuildrootSBOM.py", line 92, in main br_parser.Component(name=args.input_name, version=args.component_version, TypeError: Component.init() got an unexpected keyword argument 'type'

When I try to use the latest python_executable branch it doesn't work either:

Input file: C:\Users\azsde\Downloads\manifest.csv Output BOM: export SBOM Component Name: Test SBOM Component Version: 1R3-RCX Traceback (most recent call last): File "C:\Users\azsde\Downloads\cyclonedx-buildroot\generateBuildrootSBOM.py", line 114, in main() File "C:\Users\azsde\Downloads\cyclonedx-buildroot\generateBuildrootSBOM.py", line 93, in main new_bom = create_buildroot_sbom(args, br_bom) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\azsde\Downloads\cyclonedx-buildroot\generateBuildrootSBOM.py", line 53, in create_buildroot_sbom next_component = cyclonedx.model.component.Component(name=row['PACKAGE'], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Component.init() got an unexpected keyword argument 'package_url_type'

I installed all depencies as defined in requirement.txt

Should it be updated maybe ?

— Reply to this email directly, view it on GitHub https://github.com/CycloneDX/cyclonedx-buildroot/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABX7KNNRXFM7WZZDFF3WDJ3XJ4PTJANCNFSM6AAAAAAY4LAWIY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Robert Smigielski

ptdropper commented 1 year ago

v1.0.2 tag corrects the issue