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

CycloneDX output metadata.properties set to null instead of empty array or omitted. #1759

Open
Cerebus opened this issue Mar 20, 2024 · 2 comments
Labels
bug Something isn't working good-first-issue Good for newcomers

Comments

@Cerebus
Copy link

Cerebus commented Mar 20, 2024

What happened:

> grype -o cyclonedx-json python:3.12.2-slim > test-grype.json
> check-jsonschema --schemafile ./schema/bom-1.5.schema.json test-grype.json
Schema validation errors were encountered.
  test-grype.json::$.metadata.properties: None is not of type 'array'

What you expected to happen:
It should validate. E.g., after replacing metadata.properties: null with []:

> check-jsonschema --schemafile ./schema/bom-1.5.schema.json test-grype.json
ok -- validation done

How to reproduce it (as minimally and precisely as possible):

See above.

Anything else we need to know?:

Environment:
Application: grype
Version: 0.74.7
BuildDate: 2024-02-26T17:30:31Z
GitCommit: brew
GitDescription: [not provided]
Platform: darwin/amd64
GoVersion: go1.22.0
Compiler: gc
Syft Version: v0.105.1
Supported DB Schema: 5

@Cerebus Cerebus added the bug Something isn't working label Mar 20, 2024
@Cerebus Cerebus changed the title CycloneDX output metadata.properties set to null instead of empty array. CycloneDX output metadata.properties set to null instead of empty array or omitted. Mar 20, 2024
@wagoodman wagoodman added the good-first-issue Good for newcomers label Mar 21, 2024
@tgerla
Copy link
Contributor

tgerla commented Mar 21, 2024

Hi @Cerebus, thank you for the report! We'll get this taken care of as soon as we can.

@wagoodman
Copy link
Contributor

this is in the category of ensuring that all collections like this are allocated (currently this is omitempy)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good-first-issue Good for newcomers
Projects
Status: Ready
Development

No branches or pull requests

3 participants