Skip to content

Incorrect license conjunction match #4358

Description

@chinyeungli

Sample 1

{
  "name": "json-schema",
  "version": "0.4.0",
  "author": "Kris Zyp",
  "description": "JSON Schema validation and specifications",
  "maintainers":[
        {"name": "Kris Zyp", "email": "kriszyp@gmail.com"}],
  "keywords": [
    "json",
    "schema"
  ],
  "files": [
    "lib"
  ],
  "license": "(AFL-2.1 OR BSD-3-Clause)",
  "repository": {
    "type":"git",
    "url":"http://github.com/kriszyp/json-schema"
  },
  "directories": { "lib": "./lib" },
  "main": "./lib/validate.js",
  "devDependencies": { "vows": "*" },
  "scripts": { "test": "vows --spec test/*.js" }
}

For the above package.json file, the package scan returns afl-2.1 OR bsd-new correctly. However, the license scan returns afl-2.1 AND bsd-new which is incorrect.

Sample 2:

{
  "name": "rc",
  "version": "1.2.8",
  "description": "hardwired configuration loader",
  "main": "index.js",
  "browser": "browser.js",
  "scripts": {
    "test": "set -e; node test/test.js; node test/ini.js; node test/nested-env-vars.js"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/dominictarr/rc.git"
  },
  "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
  "keywords": [
    "config",
    "rc",
    "unix",
    "defaults"
  ],
  "bin": "./cli.js",
  "author": "Dominic Tarr <dominic.tarr@gmail.com> (dominictarr.com)",
  "dependencies": {
    "deep-extend": "^0.6.0",
    "ini": "~1.3.0",
    "minimist": "^1.2.0",
    "strip-json-comments": "~2.0.1"
  }
}

For the above package.json file, the package scan returns bsd-simplified OR mit OR apache-2.0 correctly. However, the license scan returns (bsd-simplified OR apache-2.0) AND (mit OR apache-2.0) which is incorrect.

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