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

Redundant warning for spdxDocument field #177

Closed
Badya opened this issue Jun 6, 2023 · 2 comments · Fixed by #180
Closed

Redundant warning for spdxDocument field #177

Badya opened this issue Jun 6, 2023 · 2 comments · Fixed by #180

Comments

@Badya
Copy link

Badya commented Jun 6, 2023

When generating externalDocumentRefs for libraries that have spdx.json it links spdxDocument to library's documentNamespace and emits warnings which and not very informative.

[WARNING] URI https://www.jetbrains.com/spdxdocs/bb7ae940-90ba-49fe-af02-0e3f6cee30ab does not match any model object or enumeration

According to documentNamespace field docs

NOTE: The URI does not have to be accessible. It is only intended to provide a unique ID. In many cases, the URI will point to a Web accessible document, but this should not be assumed to be the case.

I'd suggest replacing warning with debug or adding a separate handling clause for spdxDocument here

@goneall
Copy link
Member

goneall commented Jun 6, 2023

Thanks @Badya for reporting this. I've also seen this warning but wasn't sure what generated it. I agree it should be fixed.

Do you happen to have an example JSON file that produces the warning? I think we should just handle the spdxDocument, but I want to make sure I fully understand when this warning is generated.

@Badya
Copy link
Author

Badya commented Jun 15, 2023

{
  "SPDXID" : "SPDXRef-DOCUMENT",
  "spdxVersion" : "SPDX-2.3",
  "creationInfo" : {
    "created" : "2023-06-05T14:26:55Z",
    "creators" : [ "Organization: JetBrains s.r.o.", "Tool: spdx-maven-plugin" ],
    "licenseListVersion" : "3.20"
  },
  "name" : "kotlin-maven-plugin",
  "dataLicense" : "CC0-1.0",
  "externalDocumentRefs" : [ {
    "externalDocumentId" : "DocumentRef-org.jetbrains.kotlinkotlin-stdlib-jdk71.9.255-SNAPSHOT",
    "checksum" : {
      "algorithm" : "SHA1",
      "checksumValue" : "ff70a9cdaa2b71a95811b81a0c653dbe1b19fe73"
    },
    "spdxDocument" : "https://www.jetbrains.com/spdxdocs/1c09e207-81c2-429c-938f-8d175904b904"
  }]
  }

This is the minified version of the resulting JSON with other components omitted.

goneall added a commit that referenced this issue Jun 27, 2023
Fixes #177

Signed-off-by: Gary O'Neall <gary@sourceauditor.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 a pull request may close this issue.

2 participants