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

Licenses not visible after SBOM upload #2226

Open
2 tasks done
vasba opened this issue Dec 2, 2022 · 8 comments
Open
2 tasks done

Licenses not visible after SBOM upload #2226

vasba opened this issue Dec 2, 2022 · 8 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@vasba
Copy link

vasba commented Dec 2, 2022

Current Behavior

If the attached SBOM is loaded into Dependency Track the licenses are not visible.

bom.txt

Steps to Reproduce

1.Load the file
2. Check the project and no licenses are shown

Expected Behavior

The licenses should be visible in the project for each component.

Dependency-Track Version

4.6.2

Dependency-Track Distribution

Container Image

Database Server

PostgreSQL

Database Server Version

No response

Browser

Mozilla Firefox

Checklist

@vasba vasba added defect Something isn't working in triage labels Dec 2, 2022
@syalioune
Copy link
Contributor

Was able to reproduce it. It really is an issue with cyclonedx-core-java LicenceDeserializer (and maybe DT) which does not handle well nodes like

{
      "licenses": [
        {
          "license": {
            "id": "GPL-2.0"
            }
          }
        },
        {
          "expression": "GPL-2.0"
        }
      ]
}

licenses[*].license.id is ignored when encountering licenses[*].expression where as Dependency Track only manages licenses[*].license.id.

The cyclonedx-core-java license deserializer should surely be fixed. I'm not sure about Dependency Track handling license expressions.

@stevespringett
Copy link
Member

I'm not sure about Dependency Track handling license expressions.

Yes, ideally it should. One of the early tickets that nobody has had a chance to work on yet.#170

@syalioune
Copy link
Contributor

OK, i'll try to work on it (deserializer part and DT handling of license expressions)

@vasba
Copy link
Author

vasba commented Dec 7, 2022

Hi!

Great that you found this issue. I will try again when this will be fixed.

Thanks!

@JoshuaAtEriks
Copy link

encountered the same issue while uploading a SBOM generated by Aqua Trivy. The license info in SBOM json is of below format
"licenses": [ { "expression": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0" } ]

@stevespringett stevespringett added duplicate This issue or pull request already exists enhancement New feature or request and removed in triage defect Something isn't working labels Dec 30, 2022
@strowi
Copy link

strowi commented May 10, 2023

Looking forward to a fix, would love to use trivy for the sbom-generation.

@LesSyner
Copy link

LesSyner commented Jul 31, 2023

@syalioune Do you have any news about fixing this issue? I've tried few tools for SBOM generation along with license info and have found trivy to be the best tool for my needs. Sadly due to this bug I cannot use trivy-generated SBOM files in dependency-track for licenses management :(

@LesSyner
Copy link

LesSyner commented Aug 1, 2023

I've verified things on trivy side and have found issues there regarding invalidity of generated SBOM files according to CycloneDX-JSON schema. Here is issue I've created for trivy: aquasecurity/trivy#4900
It looks like issue is in trivy. I've tried SBOM files generated by other tools like syft. They are valid according to schema and when imported to Dependency-track they show properly licenses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants