Skip to content

scancode flags a C# source code files a under a proprietary license #3533

Description

@omajid

Description

This file https://github.com/dotnet/dotnet/blob/da9e54383e0b233f07c49e9fe762b4b2325f9bb1/src/nuget-client/src/NuGet.Clients/NuGet.PackageManagement.VisualStudio/Services/NuGetPackageFileService.cs is flagged by scancode as being under a proprietary license (in addition to the correctly-identified Apache license)

How To Reproduce

$ wget 'https://raw.githubusercontent.com/dotnet/dotnet/da9e54383e0b233f07c49e9fe762b4b2325f9bb1/src/nuget-client/src/NuGet.Clients/NuGet.PackageManagement.VisualStudio/Services/NuGetPackageFileService.cs
$ ./scancode --json-pp - --license --unknown-licenses --license-references  NuGetPackageFileService.cs
Setup plugins...                                                                                                                                              
Collect file inventory...                                                                                                                                     
Scan files for: licenses with 1 process(es)...                                                                                                                
[####################] 2                                                                                                                                      
{                                                                                                                                                             
  "headers": [                                                                                                                                                
    {                                                                                                                                                         
      "tool_name": "scancode-toolkit",                                                                                                                        
      "tool_version": "32.0.7",                                                                                                                               
      "options": {                                                                                                                                            
        "input": [                                                                                                                                            
          "NuGetPackageFileService.cs"                                                                                                                        
        ],                                                                                                                                                    
        "--json-pp": "-",                                                                                                                                     
        "--license": true,                                                                                                                                    
        "--license-references": true,                                                                                                                         
        "--unknown-licenses": true                                                                                                                            
      },              
...
    {
      "path": "NuGetPackageFileService.cs",
      "type": "file",
      "detected_license_expression": "apache-2.0 AND proprietary-license",
      "detected_license_expression_spdx": "Apache-2.0 AND LicenseRef-scancode-proprietary-license",
      "license_detections": [
        {
          "license_expression": "apache-2.0",
          "matches": [
            {
              "score": 100.0,
              "start_line": 2,
              "end_line": 2,
              "matched_length": 18,
              "match_coverage": 100.0,
              "matcher": "2-aho",
              "license_expression": "apache-2.0",
              "rule_identifier": "apache-2.0_120.RULE",
              "rule_relevance": 100,
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_120.RULE"
            }
          ],
          "identifier": "apache_2_0-b87a848a-4d72-1be9-f552-866c25491283"
        },
        {
          "license_expression": "proprietary-license",
          "matches": [
            {
              "score": 100.0,
              "start_line": 30,
              "end_line": 32,
              "matched_length": 2,
              "match_coverage": 100.0,
              "matcher": "2-aho",
              "license_expression": "proprietary-license",
              "rule_identifier": "proprietary-license_553.RULE",
              "rule_relevance": 100,
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/proprietary-license_553.RULE"
            }
          ],
          "identifier": "proprietary_license-b1054f4e-0ab7-b45e-ee83-22656324dc89"
        }
      ],
      "license_clues": [],
      "percentage_of_license_text": 3.27,
      "scan_errors": []
    }

System configuration

For bug reports, it really helps us to know:

  • What OS are you running on? Linux
  • What version of scancode-toolkit was used to generate the scan file? 32.0.7
  • What installation method was used to install/run scancode? pip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions