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

What should "SBOM Author" name be if SBOM created by a tool? #52

Closed
rnjudge opened this issue Jan 24, 2023 · 5 comments · Fixed by #56
Closed

What should "SBOM Author" name be if SBOM created by a tool? #52

rnjudge opened this issue Jan 24, 2023 · 5 comments · Fixed by #56
Assignees
Labels
bug Something isn't working P0 High priority

Comments

@rnjudge
Copy link

rnjudge commented Jan 24, 2023

When I run this tool on an SPDX document created by Tern, I get a False status for SBOM author name provided field. My question is, what should this field be when a document is created by a tool? According to the spec, https://spdx.github.io/spdx-spec/v2.3/how-to-use/#k22-mapping-ntia-minimum-elements-to-spdx-fields, Author maps to the Creator field. In this case, the creator is a tool and the SBOM includes this information:

Creator: Tool: tern-2dd359916884b250e8b66d94c175506e387df07e

What is the tool looking for?

@rnjudge
Copy link
Author

rnjudge commented Jan 24, 2023

photon.spdx.txt

@rnjudge
Copy link
Author

rnjudge commented Jan 24, 2023

I should also note that using the -v option does not specify additional information about missing author (despite the other False status fields providing information about whats missing):

Is this SBOM NTIA minimum element conformant? False

Individual elements                            | Status
-------------------------------------------------------
All component names provided?                  | True
All component versions provided?               | False
All component identifiers provided?            | True
All component suppliers provided?              | False
SBOM author name provided?                     | False
SBOM creation timestamp provided?              | True
Dependency relationships provided?             | True

Components missing a version: 5e94941e3961b26645fbfdc71a59d439537b98417546bfdab35fa074f121eb15

Components missing an supplier: photon,5e94941e3961b26645fbfdc71a59d439537b98417546bfdab35fa074f121eb15,bash,bzip2-libs,ca-certificates,ca-certificates-pki,curl,curl-libs,e2fsprogs-libs,elfutils-libelf,expat,expat-libs,filesystem,glibc,krb5,libcap,libdb,libgcc,libmetalink,libsolv,libssh2,lua,ncurses-libs,nspr,nss-libs,openssl,photon-release,photon-repos,popt,readline,rpm-libs,sqlite-libs,tdnf,tdnf-cli-libs,toybox,xz-libs,zlib,zstd-libs

@jspeed-meyers
Copy link
Collaborator

@rnjudge, thank you for investigating these bugs closely!

What is the tool looking for?

The tool CURRENTLY checks that the author is a person or organization.

def check_doc_author(self):
"""Check document author is person or organization."""
for i, _ in enumerate(self.doc.creation_info.creators):
if isinstance(
self.doc.creation_info.creators[i],
(spdx.creationinfo.Person, spdx.creationinfo.Organization),
):
return True
return False

My question is, what should this field be when a document is created by a tool? According to the spec, https://spdx.github.io/spdx-spec/v2.3/how-to-use/#k22-mapping-ntia-minimum-elements-to-spdx-fields, Author maps to the Creator field.

It seems that, IIUC, ntia-conformance-checker should actually check if there is any entry in the Creator field, including a tool.

I'll put in a PR to fix this.

@jspeed-meyers
Copy link
Collaborator

I should also note that using the -v option does not specify additional information about missing author (despite the other False status fields providing information about whats missing):

That's a good point. There should be extra info here. I'll open a separate issue for that.

@rnjudge
Copy link
Author

rnjudge commented Jan 26, 2023

Thanks for such a quick fix/response @jspeed-meyers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P0 High priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants