Skip to content

Handle missing components in CSV conversion - #523

Open
dajiaohuang wants to merge 1 commit into
CycloneDX:mainfrom
dajiaohuang:repostew/fix-csv-empty-components-20261030
Open

dajiaohuang wants to merge 1 commit into
CycloneDX:mainfrom
dajiaohuang:repostew/fix-csv-empty-components-20261030

Conversation

@dajiaohuang

Copy link
Copy Markdown

A valid BOM may omit its optional components collection. CSV serialization currently throws when enumerating it. Keep the header and skip the absent collection, with four CLI regressions for absent/empty collections in JSON and XML.

Fixes #288.

Validation recorded on 2026-10-15 against the unchanged main base (b3cfa4b0edc356dad07e0b6e7ab6da0a94af0246) and byte-identical production/test files: base suite 129/129; new regressions on base 3 failures/1 pass; candidate suite 133/133; all four regression inputs passed explicit schema validation. These checks were not rerun for this submission; the separate README-only change from that validated tree is omitted here.

Build limitation: the warning-as-error build passed only with NuGetAudit=false; the unmodified build failed on existing dependency-advisory warnings. This PR changes no dependencies and does not claim dependency remediation or current CI acceptance.

Emit the CSV header for valid BOMs without an optional components
collection, with absent/empty JSON and XML regression coverage.

Signed-off-by: wushuwen <mikewushuwen@outlook.com>
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

Successfully merging this pull request may close these issues.

'Object reference not set to an instance of an object' error when trying to convert BOM without components

1 participant