Skip to content
New issue

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

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

Already on GitHub? # to your account

SPDX originator is not always populated #2632

Closed
wagoodman opened this issue Feb 13, 2024 · 0 comments · Fixed by #2822
Closed

SPDX originator is not always populated #2632

wagoodman opened this issue Feb 13, 2024 · 0 comments · Fixed by #2822
Assignees
Labels
bug Something isn't working format:spdx SPDX related enhancement or bug

Comments

@wagoodman
Copy link
Contributor

When determining originator we only consider select ecosystems:

switch metadata := p.Metadata.(type) {
case pkg.ApkDBEntry:
author = metadata.Maintainer
case pkg.NpmPackage:
author = metadata.Author
case pkg.PythonPackage:
author = metadata.Author
if author == "" {
author = metadata.AuthorEmail
} else if metadata.AuthorEmail != "" {
author = fmt.Sprintf("%s (%s)", author, metadata.AuthorEmail)
}
case pkg.RubyGemspec:
if len(metadata.Authors) > 0 {
author = metadata.Authors[0]
}
case pkg.RpmDBEntry:
typ = "Organization"
author = metadata.Vendor
case pkg.DpkgDBEntry:
author = metadata.Maintainer
}
if typ == "" && author != "" {
typ = "Person"

Ideally we should expand this to fill in an answer in as many ecosystems as possible. There have been suggestions to at least add Java under consideration, looking specifically at the Specification-Vendor followed by Implementation-Vendor for non-empty values to use as an originator.

We should probably add a completion-test for this, which exhaustively covers all metadata types (use this). This way we can ensure that as new metadata types are added we can fail if there isn't an explicit test to cover originator functionality.

@wagoodman wagoodman added bug Something isn't working format:spdx SPDX related enhancement or bug labels Feb 13, 2024
@wagoodman wagoodman added this to OSS Feb 13, 2024
@wagoodman wagoodman moved this to Ready in OSS Feb 13, 2024
@wagoodman wagoodman self-assigned this Apr 19, 2024
@wagoodman wagoodman moved this from Ready to In Progress in OSS Apr 19, 2024
@wagoodman wagoodman moved this from In Progress to In Review in OSS Apr 29, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in OSS Apr 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working format:spdx SPDX related enhancement or bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant