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

feat(sbom): Add marshal for spdx #2867

Merged
merged 4 commits into from Sep 14, 2022
Merged

feat(sbom): Add marshal for spdx #2867

merged 4 commits into from Sep 14, 2022

Conversation

masahiro331
Copy link
Collaborator

@masahiro331 masahiro331 commented Sep 13, 2022

Description

Add RelationShip for SPDX

Add RelationShip document for spdx output.
The following dependencies are added.

スクリーンショット 2022-09-14 2 29 26

Add purl to SPDX.

This change is necessary for vulnerability detection using SPDX.
#2170 (comment)

Before


                {
                        "SPDXID": "SPDXRef-fe2fe0f208812c6b",
                        "filesAnalyzed": false,
                        "licenseConcluded": "GPLv2+",
                        "licenseDeclared": "GPLv2+",
                        "name": "hostname",
                        "versionInfo": "3.20"
                }

After

                {
                        "SPDXID": "SPDXRef-fe2fe0f208812c6b",
                        "externalRefs": [
                                {
                                        "referenceCategory": "PACKAGE-MANAGER",
                                        "referenceLocator": "pkg:rpm/centos/hostname@3.20-6.el8?arch=aarch64\u0026distro=centos-8.4.2105",
                                        "referenceType": "purl"
                                }
                        ],
                        "filesAnalyzed": false,
                        "licenseConcluded": "GPLv2+",
                        "licenseDeclared": "GPLv2+",
                        "name": "hostname",
                        "versionInfo": "3.20"
                }

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

version: version,
options: o,
output: output,
version: version,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is it used?

Comment on lines 170 to 171
if os == nil {
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is it for?

@knqyf263 knqyf263 merged commit 3165c37 into main Sep 14, 2022
@knqyf263 knqyf263 deleted the feat/spdx_marshal branch September 14, 2022 10:36
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.

Add PURL to SPDX
2 participants