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

Add ALPM Metadata to CYCLONEDX and SPDX output formats #1037

Closed
spiffcs opened this issue Jun 8, 2022 · 5 comments · Fixed by #1747
Closed

Add ALPM Metadata to CYCLONEDX and SPDX output formats #1037

spiffcs opened this issue Jun 8, 2022 · 5 comments · Fixed by #1747
Labels
enhancement New feature or request good-first-issue Good for newcomers

Comments

@spiffcs
Copy link
Contributor

spiffcs commented Jun 8, 2022

What would you like to be added:
ALPM package parsing/identification has been added to Syft as of #943.

The next step is getting the metadata for those packages output into both SPDX and CycloneDX. Currently, the package metadata is only available within the SYFT-JSON format.

Why is this needed:
Information parity across formats.

Additional context:
See #943 for details on how the metadata was constructed for SYFT-JSON

@spiffcs spiffcs added the enhancement New feature or request label Jun 8, 2022
@wagoodman
Copy link
Contributor

@tgerla tgerla added the good-first-issue Good for newcomers label Mar 2, 2023
@tgerla
Copy link
Contributor

tgerla commented Mar 2, 2023

If anyone's interested in tackling this issue, you can start by looking at the structure here: https://github.com/anchore/syft/blob/main/syft/pkg/alpm_metadata.go#L17-L29

Notice that right now there is only one item with a CycloneDX tag in it: Size. Any properties that you expect to be exported to the CycloneDX output will need to have a CycloneDX tag added, like Size.

@shanedell
Copy link
Contributor

shanedell commented Apr 17, 2023

@wagoodman @tgerla I would like work on this item. One question, I understand how to add the CycloneDX tag to the ALPM Metadata, however how is this done with SPDX? Does it just pick up based on CycloneDX tag? Wondering this as I didn't seem to find a spdx tag like I did for cyclonedx

@shanedell
Copy link
Contributor

Would it be something like

Size         int              `mapstructure:"size" json:"size" cyclonedx:"size" spdx: "size"`

or

Size         int              `mapstructure:"size" json:"size" cyclonedx:"size" spdxjson:"size"`

?

@kzantow
Copy link
Contributor

kzantow commented Apr 17, 2023

@shanedell the cyclonedx tags define which fields are output as CycloneDX properties. SPDX does not have arbitrary properties, hence does not have any tags. Each property in SPDX needs to map to a specific field in the SPDX spec, it's quite possible much of these do not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good-first-issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants