ossf/scorecard

Unlicense not accepted as FSF or OSI approved

Closed this issue · 4 comments

Describe the bug
Even if https://spdx.org/licenses/ clearly describes The Unlicense is an approved license, a repository using Unlicense generates

Warn: project license file does not contain an FSF or OSI license.

and also removes one point from the score. Check the license score for this repo

Reproduction steps
N/A

Expected behavior
Point should not deducted/scaled since it is an FSF and OSI approved license

Additional context
N/A

Thanks for the report. This work is already tracked in #4031.

Sorry, that wasn't actually the cause. I'm guessing it's related to this block

// called 'The Unlicense' with the Spdx id 'Unlicense'.
// For the regex's 'un' will match the [pre|suf]Spdx
// regex group (just as it would match '0BSD'), but
// 'un' will not "hit" in the map with key 'Unlicense'
// so change to 'UN' for 'unlicense' for 'isLicenseFile()'
// TODO: make this general (pass a key map for changing these
// special cases). For now this is the only one.
if strings.ToUpper(key) == "UNLICENSE" {
fsfOsiApprovedLicenseCiMap["UN"] = entry
} else {
fsfOsiApprovedLicenseCiMap[strings.ToUpper(key)] = entry
}

@spencerschrock Thanks for the quick fix!

This wont make it to scorecard action for a bit though, so it may take some time to see it reflected in the API results.