Skip to content

Fix classification of custom licenses in License Compliance

What does this MR do and why?

Fix for #285120 (closed)

Custom licenses that are not listed in spdx index do not appear on Pipeline Policy tab. That happens because such licenses are added to database by their name, but referenced in the scanning report by id. This MR fixes that as well as introduces small refactoring for its test suit.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

Example of the bug https://gitlab.com/brytannia/test-license-test/-/pipelines/383274955/licenses

Fix:

Screenshot_2021-10-08_at_19.09.47

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #285120 (closed)

Edited by Tetiana Chupryna

Merge request reports

Loading