{"id":18376839,"url":"https://github.com/bbc/apache2-license-checker","last_synced_at":"2025-06-30T12:37:48.006Z","repository":{"id":57100214,"uuid":"83544178","full_name":"bbc/apache2-license-checker","owner":"bbc","description":"Automated license checker for validating project dependencies for compatible Apache2 licenses.","archived":false,"fork":false,"pushed_at":"2023-04-18T06:28:46.000Z","size":32,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":69,"default_branch":"master","last_synced_at":"2025-05-14T16:21:30.683Z","etag":null,"topics":["complaints","tool","tv","tv-and-radio"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-01T10:50:29.000Z","updated_at":"2019-02-27T14:21:28.000Z","dependencies_parsed_at":"2024-06-19T11:31:44.234Z","dependency_job_id":"52212118-91b8-40dc-a6bc-21eb135c75f6","html_url":"https://github.com/bbc/apache2-license-checker","commit_stats":{"total_commits":37,"total_committers":6,"mean_commits":6.166666666666667,"dds":0.3783783783783784,"last_synced_commit":"0b30e5f3f0c5bc3c438625e763faea1e22565c08"},"previous_names":["bbc/tvp-apache2-license-checker"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/bbc/apache2-license-checker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fapache2-license-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fapache2-license-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fapache2-license-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fapache2-license-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbc","download_url":"https://codeload.github.com/bbc/apache2-license-checker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fapache2-license-checker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262775123,"owners_count":23362449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["complaints","tool","tv","tv-and-radio"],"created_at":"2024-11-06T00:25:03.220Z","updated_at":"2025-06-30T12:37:47.910Z","avatar_url":"https://github.com/bbc.png","language":"JavaScript","funding_links":[],"categories":["Software"],"sub_categories":["Tools \u0026 libs"],"readme":"# Apache2 License Checker\n\nAutomated license checker for validating project dependencies for compatible Apache2 licenses.\n\n## Use with your project\n\n- Run `npm install @bbc/apache2-license-checker --save-dev`\n- Modify your `package.json` to include `apache2-license-checker` as part of your *test* script\n\nFor example:\n```js\n...\n  \"scripts\": {\n    \"test\": \"mocha \u0026\u0026 npm run check-licenses\",\n    \"check-licenses\": \"apache2-license-checker\"\n  },\n...\n```\n\nThe license checker will fail with an *exit code* of `1` if there are any problems with the license, and will pass with an *exit code* of `0` if all checks are ok.\n\nA temporary file `licenses.json` will be created containing a full license analysis based on output from the [`license-checker`](https://www.npmjs.com/package/license-checker) tool. You will probably want to `.gitignore` this file.\n\n## Creating Exceptions\n\nIf the license checker throws errors, and you've verified the errors as acceptable risks, then you may want to create an exceptions file in your local project. For example:\n\n### `license-exceptions.json`\n```\n{\n  \"exceptions\": {\n    \"cosmos-deploy@*\": {\n      \"reason\": \"Not required, acceptable use for BBC internal deployments\"\n    },\n    \"cycle@1.0.3\": {\n      \"reason\": \"Public Domain; see: https://github.com/dscape/cycle/\"\n    },\n    \"map-stream@0.1.0\": {\n      \"reason\": \"MIT License; see: https://github.com/dominictarr/map-stream\"\n    },\n    \"ua-parser-js@0.7.17\": {\n      \"reason\": \"Public Domain; see https://github.com/faisalman/ua-parser-js\"\n    }\n  }\n}\n```\n\n## Development\n\nTo support\n\n- Check out the code\n- Run `npm install`\n- Run `npm test`\n\nModify `scripts/whitelist.js` to allow additional licenses or license combinations.\n\nModify `scripts/exceptions.js` to allow specific modules for a given reason.\n\nPlease push to a branch and raise a pull request, or fork and do the same.\n\n## Example output\n\nIn normal usage running `npm run check-licenses` produces an output similar to:\n\n```\nAcceptable project licenses (uses):\n  (MIT AND CC-BY-3.0) (1)\n  Apache-2.0 (3)\n  BSD-2-Clause (1)\n  BSD-3-Clause (1)\n  ISC (15)\n  MIT (23)\n  Unlicense (1)\n  WTFPL (1)\n\nAcceptable project license exceptions:\n  cosmos-deploy@3.1.2\n    Reason: Not required, acceptable use for BBC internal deployments\n  cycle@1.0.3\n    Reason: Public Domain; see: https://github.com/dscape/cycle/\n  map-stream@0.1.0\n    Reason: MIT License; see: https://github.com/dominictarr/map-stream\n\nAll licenses ok Licensed (46) Exceptions (0) Problems (0)\n```\n\nIf there is a problem with the licenses, then expect an output similar to:\n\n```\nAcceptable project licenses (uses):\n  Apache-2.0 (3)\n  BSD-2-Clause (1)\n  BSD-3-Clause (1)\n  CC-BY-3.0 (1)\n  CC0-1.0 (1)\n  ISC (16)\n  MIT (25)\n\nAcceptable project license exceptions:\n  spdx-exceptions@2.1.0\n    Reason: Public Domain; see https://github.com/kemitchell/spdx-exceptions.json\n\nProblems with the licenses for these dependencies:\n  spdx-license-ids@3.0.0\n    License:     CC0-1.0\n    Repository:  https://github.com/shinnn/spdx-license-ids\n    Publisher:   Shinnosuke Watanabe\n    Url:         https://github.com/shinnn\n\n\nLicenses not ok Licensed (46) Exceptions (1) Problems (1)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc%2Fapache2-license-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbc%2Fapache2-license-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc%2Fapache2-license-checker/lists"}