Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when use test_parser.parse_file("file") #24

Closed
enzofrnt opened this issue Dec 19, 2023 · 2 comments
Closed

Issue when use test_parser.parse_file("file") #24

enzofrnt opened this issue Dec 19, 2023 · 2 comments

Comments

@enzofrnt
Copy link

Hi, all the information are here :
File "/usr/lib/python3.11/site-packages/lib4sbom/cyclonedx/cyclonedx_parser.py", line 353, in _parse_component_xml self.cyclonedx_package.set_property(params["name"], params["value"])

image

@anthonyharrison
Copy link
Owner

anthonyharrison commented Jan 2, 2024

@enzofrnt The problem is the way that syft defines a property.

A property is a key/value pair and the value can be specified explicitly as an attribute

            <properties>
                <property name="Foo" value="789"/>
                <property name="Bar" value="GHI"/>
            </properties>

or implicitly, like this

      <properties>
            <property name="Foo">789</property>
            <property name="Bar">GHI</property>
        </properties>

The code in the parser was only handling the explicit format (which is aligned with the examples on the CyclonedDX website). I will work on a fix to handle the implicit case

@anthonyharrison
Copy link
Owner

Fixed in release 0.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants