fix(OSPS-LE-02.01): pass deprecated but OSI/FSF-approved SPDX IDs#355
Merged
Conversation
Member
|
@joanagmaia please sign your commits to satisfy DCO check. |
The GoodLicense step was failing any license with isDeprecatedLicenseId=true, even when isOsiApproved=true or isFsfLibre=true. This produced false negatives for widely-used licenses like AGPL-3.0, GPL-2.0, GPL-3.0, and LGPL-2.1, which GitHub's License API still returns in deprecated form. Drop the deprecation clause from the fail condition. Track deprecated-but-approved IDs separately and surface them as a non-failing advisory note in the passing message, so maintainers are informed of the SPDX identifier hygiene issue without the control being marked as failed. Fixes ossf#347 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
e7210d8 to
9c19e86
Compare
Contributor
Author
|
Hey @eddie-knight, do you think you could check this one out? Also proposed a fix for this reported issue #347 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OSPS-LE-02.01for deprecated-but-approved SPDX IDs (AGPL-3.0,GPL-2.0,GPL-3.0,LGPL-2.1) that GitHub's License API still returns in deprecated form.|| license.IsDeprecatedLicenseIdclause from the fail condition inGoodLicense— licenses now fail only when neither OSI- nor FSF-approved.Root cause
evaluation_plans/osps/legal/steps.goline 95 (before fix):The
|| license.IsDeprecatedLicenseIdclause caused any deprecated SPDX ID to be treated as a bad license regardless of approval status, producing the misleading failure message "These licenses are not OSI or FSF approved: AGPL-3.0" for projects like Grafana and Renovate.Test plan
TestGoodLicensecases unchanged and passingAGPL-3.0(isOsiApproved:true, isFsfLibre:true, isDeprecatedLicenseId:true) →Passedwith deprecation noteMIT AND AGPL-3.0mix →Passedwith note listing onlyAGPL-3.0AGPL-3.0 AND BadLicensemix →Failedreferencing onlyBadLicenseFailedmake vet && make testgreenCloses #347
🤖 Generated with Claude Code