aboutcode-org / aboutcode-org/scancode-toolkit

Obvious `mit` text is detected as unknown-license-reference

Đang mở
#4,481 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
2.6k
Fork
791
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
5

Mô tả

### Description

https://github.com/tj/node-cookie-signature with tag 1.2.2 is being identified as `LicenseRef-scancode-unknown-license-reference AND MIT`

is this a scancode issue, is node-cookie-signature s fault?
this is a very similar issue https://github.com/aboutcode-org/scancode-toolkit/issues/4387

### How To Reproduce

```
git clone git@github.com:tj/node-cookie-signature.git
git checkout 1.2.2
scancode --license --json-pp /tmp/results.json node-cookie-signature
```

results in
```
{ 12:17:53 [25/312]
"path": "node-cookie-signature/Readme.md",
"type": "file",
"detected_license_expression": "unknown-license-reference AND mit",
"detected_license_expression_spdx": "LicenseRef-scancode-unknown-license-reference AND MIT",
"license_detections": [
{
"license_expression": "unknown-license-reference AND mit",
"license_expression_spdx": "LicenseRef-scancode-unknown-license-reference AND MIT",
"matches": [
{
"license_expression": "mit",
"spdx_license_expression": "MIT",
"from_file": "node-cookie-signature/Readme.md",
"start_line": 19,
"end_line": 23,
"matcher": "2-aho",
"score": 100.0,
"matched_length": 4,
"match_coverage": 100.0,
"rule_relevance": 100,
"rule_identifier": "mit_1187.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_1187.RULE"
},
{
"license_expression": "unknown-license-reference",
"spdx_license_expression": "LicenseRef-scancode-unknown-license-reference",
"from_file": "node-cookie-signature/Readme.md",
"start_line": 23,
"end_line": 23,
"matcher": "2-aho",
"score": 100.0,
"matched_length": 5,
"match_coverage": 100.0,
"rule_relevance": 100,
"rule_identifier": "unknown_10.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown_10.RULE"
},
{
"license_expression": "mit",
"spdx_license_expression": "MIT",
"from_file": "node-cookie-signature/LICENSE",
"start_line": 1,
"end_line": 1,
"matcher": "2-aho",
"score": 100.0,
"matched_length": 3,
"match_coverage": 100.0,
"rule_relevance": 100,
"rule_identifier": "mit_27.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_27.RULE"
},
{
"license_expression": "mit",
"spdx_license_expression": "MIT",
"from_file": "node-cookie-signature/LICENSE",
"start_line": 5,
"end_line": 22,
"matcher": "2-aho",
"score": 100.0,
"matched_length": 161,
"match_coverage": 100.0,
"rule_relevance": 100,
"rule_identifier": "mit.LICENSE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE"
}
],
"identifier": "unknown_license_reference_and_mit-79e5d109-e53e-7f7e-d7f6-4881eea3c394",
"detection_log": [
"unknown-reference-to-local-file"
]
}
],
```

### System configuration

> For bug reports, it really helps us to know:

* What OS are you running on? (Windows/MacOS/Linux)
Fedora 42

* What version of scancode-toolkit was used to generate the scan file?
```
zarathustra@esel ~ % scancode --version
ScanCode version: 32.2.0
ScanCode Output Format version: 3.2.0
SPDX License list version: 3.24
```
* What installation method was used to install/run scancode? (pip/source download/other)
`dnf`

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.