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

Improved license name recognition #24

Open
deevus opened this issue Jan 18, 2021 · 3 comments
Open

Improved license name recognition #24

deevus opened this issue Jan 18, 2021 · 3 comments

Comments

@deevus
Copy link

deevus commented Jan 18, 2021

License names seem to vary wildly across different projects. Here are 3 examples which use the same Apache 2.0 license:

    'Apache-2.0'
    'Apache 2.0'
    'Apache License, Version 2.0'

It might be possible to sanitise or tokenise these variations so that can they be recognised as the same license.

@deevus
Copy link
Author

deevus commented Jan 18, 2021

There also seems to be a common pattern of listing multiple licenses in package.json.

For example:

    '(BSD-2-Clause OR MIT)',
    '(BSD-2-Clause OR MIT OR Apache-2.0)',
    '(BSD-3-Clause OR GPL-2.0)',
    '(CC-BY-4.0 AND MIT)',
    '(GPL-2.0 OR MIT)',
    '(MIT AND CC-BY-3.0)',
    '(MIT AND BSD-3-Clause)',
    '(MIT AND Zlib)',
    '(MIT OR Apache-2.0)',
    '(WTFPL OR MIT)',
    '(AFL-2.1 OR BSD-3-Clause)',

These sometimes appear with or without parenthesis. Potentially it could recognise the AND/OR and use that to determine whether a module should be flagged depending on the combination of licenses and the conjunction used.

@marekbrainhub
Copy link
Member

Thanks for reporting, we will take a look.

@marekbrainhub
Copy link
Member

@deevus Regarding tokenisation, we will not be doing it for security reasons. It's possible that someone might create his custom license called e.g. "GPL" with some unknown terms and it would erroneously get flagged as GPLv3. The preferable choice of action when dealing with weird license name formats would be to persuade package maintainers to use SPDX.

As for multiple licenses, we have added it to our internal board.

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

No branches or pull requests

2 participants