[QUESTION] Bug or feature - "licensed under the" triggers OSL-3.0 rule

オープン
#5,347 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@Anurag-S1ngh がすでに取り組んでいます。

2026年10月31日 から。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
search

調査の方向性

Start by reading the referenced OSL rule files, osl-3.0_54.RULE and osl-3.0_26.RULE, and investigate how ScanCode applies their matching rules to the examples in the issue. Check existing tests for license-rule matching and add or update coverage for generic license wording versus genuine OSL references. Done means the Katex example no longer produces a false OSL-3.0 detection while valid OSL matches remain detectable.

索引モデルが issue の本文から書いたものです。

説明

I ran into this one using ClearlyDefined. I chose to open the issue here as I think it is closer to Scandcode than to CD.

The project Katex's README says:

KaTeX is licensed under the [MIT License](https://opensource.org/licenses/MIT).

The three words "licensed under the" trigger the osl.3.0_54.RULE, according to CD's API response

"license_detections": [
{
"license_expression": "osl-3.0 AND mit",
"license_expression_spdx": "OSL-3.0 AND MIT",
"matches": [
{
"license_expression": "osl-3.0",
"license_expression_spdx": "OSL-3.0",
"from_file": "cd--1-2FprPcto73nv/package/dist/README.md",
"start_line": 123,
"end_line": 125,
"matcher": "3-seq",
"score": 52.94,
"matched_length": 9,
"match_coverage": 52.94,
"rule_relevance": 100,
"rule_identifier": "osl-3.0_54.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/osl-3.0_54.RULE",
"matched_text": "## License\n\nKaTeX is licensed under the [MIT License](https://opensource.org/licenses/MIT).",
"matched_text_diagnostics": "License\n\n[KaTeX] [is] licensed under the [[MIT] License](https://opensource.org/licenses/"
}

Question: Is this intended? I mean, "licensed under the" is a very generic statement. Would every component which states that it is "licensed under the <enter_name_of_license_here>" trigger this OSL-3.0 rule?

Similar example:

"the full text of the license" triggers osl-3.0_26.RULE, for the aws-sdk-go-v2

https://github.com/aws/aws-sdk-go-v2/blob/main/service/lambda/api_op_PublishLayerVersion.go#L69

// The layer's software license. It can be any of the following:
	//
	//   - An [SPDX license identifier]. For example, MIT .
	//
	//   - The URL of a license hosted on the internet. For example,
	//   https://opensource.org/licenses/MIT .
	//
	//   - The full text of the license.
	//
	// [SPDX license identifier]: https://spdx.org/licenses/
	LicenseInfo *string

vs.

https://github.com/aboutcode-org/scancode-toolkit/blob/develop/src/licensedcode/data/rules/osl-3.0_26.RULE#L12

# This software is licensed under the Open Software License version
# 3.0. The full text of this license can be found in https://opensource.org/licenses/OSL-3.0
# or in the file LICENSE which is distributed along with the software.
主要言語
Python
スター
2.7k
フォーク
831
平均マージ
3日 4時間
マージ済み PR(30日)
7

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aboutcode-org/scancode-toolkit のほかの issue

aboutcode-org/scancode-toolkit の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。