Repository navigation
Conversation
osl-3.0_54.RULE and osl-3.0_26.RULE lacked required phrases and explicit minimum coverage. Due to the default 50% coverage threshold for medium rules, a partial sequence match on generic boilerplate (e.g. 'licensed under the' or 'the full text of the license') triggered false-positive OSL-3.0 detections on other licenses such as MIT. Mark 'Open Software License version 3.0' as a required phrase and set minimum_coverage: 80 on both rules. Fixes aboutcode-org#5347 Signed-off-by: Adnan9-63 <muhammad1414114@gmail.com>
| license_expression: osl-3.0 | ||
| is_license_notice: yes | ||
| relevance: 100 | ||
| minimum_coverage: 80 |
| license_expression: osl-3.0 | ||
| is_license_tag: yes | ||
| relevance: 100 | ||
| minimum_coverage: 80 |
This branch has not been deployed
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.

What this PR does / why we need it:
Fixes false-positive
osl-3.0detections where generic preamble phrases like"licensed under the"or"the full text of the license"triggeredosl-3.0_54.RULEandosl-3.0_26.RULEduring approximate sequence matching (3-seq).Problem:
Both rules lacked required phrases (
{{...}}) and explicitminimum_coverage. Becauseosl-3.0_54.RULEhas 17 tokens, ScanCode's dynamic length threshold (models.py:2654-2658) computed a default minimum coverage of50%. When scanning texts containing generic phrasing likeKaTeX is licensed under the [MIT License](https://opensource.org/licenses/MIT), the 9 overlapping preamble/URL tokens yielded~52.94%coverage, causing3-seqto falsely reportosl-3.0alongsidemit.Solution:
{{Open Software License version 3.0}}as a required phrase in bothosl-3.0_54.RULEandosl-3.0_26.RULE.minimum_coverage: 80to the YAML frontmatter of both rules to prevent partial fragment matching.Fixes #5347
Checklist:
pytest tests/licensedcode/test_required_phrases.pyandpytest tests/licensedcode/test_license_models.py -k 'key_phrases or spdxrule'git commit -s)Signed-off-by: Adnan9-63 muhammad1414114@gmail.com