aboutcode-org / aboutcode-org/scancode-toolkit

`unknown-license-reference` to complex paths are not followed

Đang mở
#4,487 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug improve-license-detection license-reference
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/Automattic/node-canvas with tag 3.1.2 is being identified as LicenseRef-scancode-unknown-license-reference AND MIT

is this a scancode issue, or is this node-canvas s fault?
There are a very similar issues:
- https://github.com/aboutcode-org/scancode-toolkit/issues/4387
- https://github.com/aboutcode-org/scancode-toolkit/issues/4481

### How To Reproduce

```sh
git clone git@github.com:Automattic/node-canvas.git
git checkout 3.1.2
scancode --license --json-pp /tmp/results.json node-cookie-signature
````
results in
```json
{
"path": "node-canvas/Readme.md",
"type": "file",
"detected_license_expression": "mit AND (mit AND unknown-license-reference)",
"detected_license_expression_spdx": "MIT AND (MIT AND LicenseRef-scancode-unknown-license-reference)",
"license_detections": [
{
"license_expression": "mit",
"license_expression_spdx": "MIT",
"matches": [
{
"license_expression": "mit",
"spdx_license_expression": "MIT",
"from_file": "node-canvas/Readme.md",
"start_line": 632,
"end_line": 632,
"matcher": "2-aho",
"score": 100,
"matched_length": 3,
"match_coverage": 100,
"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"
}
],
"identifier": "mit-3ab5a1cd-6f73-3105-a815-d0d7c55b1922"
},
{
"license_expression": "mit AND unknown-license-reference",
"license_expression_spdx": "MIT AND LicenseRef-scancode-unknown-license-reference",
"matches": [
{
"license_expression": "mit",
"spdx_license_expression": "MIT",
"from_file": "node-canvas/Readme.md",
"start_line": 638,
"end_line": 653,
"matcher": "2-aho",
"score": 100,
"matched_length": 161,
"match_coverage": 100,
"rule_relevance": 100,
"rule_identifier": "mit.LICENSE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE"
},
{
"license_expression": "unknown-license-reference",
"spdx_license_expression": "LicenseRef-scancode-unknown-license-reference",
"from_file": "node-canvas/Readme.md",
"start_line": 657,
"end_line": 657,
"matcher": "2-aho",
"score": 100,
"matched_length": 2,
"match_coverage": 100,
"rule_relevance": 100,
"rule_identifier": "unknown-license-reference_see-license_1.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_see-license_1.RULE"
}
],
"identifier": "mit_and_unknown_license_reference-ca4b59e1-36db-1321-b1ca-a4fad99cffb0"
}
],
"license_clues": [],
"percentage_of_license_text": 4.26,
"scan_errors": []
}
```

### 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?
```sh
% 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.