{"id":26658989,"url":"https://github.com/trustbit/licenseguard","last_synced_at":"2025-04-11T14:09:46.273Z","repository":{"id":28332766,"uuid":"118134310","full_name":"trustbit/licenseguard","owner":"trustbit","description":"Command line tool for running license checks to guard you from using packages with blacklisted licenses. Integrates well into your ci workflow.","archived":false,"fork":false,"pushed_at":"2023-01-05T09:37:10.000Z","size":916,"stargazers_count":8,"open_issues_count":14,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T10:17:25.313Z","etag":null,"topics":["ci","jenkins","license-checking","license-scan","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trustbit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-19T14:22:52.000Z","updated_at":"2022-06-10T00:15:45.000Z","dependencies_parsed_at":"2023-01-14T08:38:40.086Z","dependency_job_id":null,"html_url":"https://github.com/trustbit/licenseguard","commit_stats":null,"previous_names":["softwarepark/licenseguard"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustbit%2Flicenseguard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustbit%2Flicenseguard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustbit%2Flicenseguard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustbit%2Flicenseguard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trustbit","download_url":"https://codeload.github.com/trustbit/licenseguard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248413742,"owners_count":21099351,"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":["ci","jenkins","license-checking","license-scan","nodejs"],"created_at":"2025-03-25T10:17:28.900Z","updated_at":"2025-04-11T14:09:46.244Z","avatar_url":"https://github.com/trustbit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# License Guard\n\nCommand line tool for running license checks to guard you from using packages with blacklisted licenses. Integrates well into your ci workflow.\nUses [license-checker](https://www.npmjs.com/package/license-checker) under the hood.\n\n[![Build Status](https://travis-ci.org/Softwarepark/licenseguard.svg?branch=master)](https://travis-ci.org/Softwarepark/licenseguard)\n\n[![Coverage Status](https://coveralls.io/repos/github/Softwarepark/licenseguard/badge.svg?branch=master)](https://coveralls.io/github/Softwarepark/licenseguard?branch=master)\n\n## Install\n\n```bash\nnpm i licenseguard -g\n```\n\n## Usage\n\n```bash\nUsage: licenseguard [options]\n\nOptions:\n  --production              Test only production dependencies\n  --development             Test only development dependencies\n  --blacklist \u003clicense\u003e     Test that license is not used in any npm dependency\n  --ignore \u003cpackage\u003e        Ignore package matching \u003cpackage\u003e allows star patterns\n  --path \u003cpath\u003e             Test \"path\" for license violations. Defaults to current directory\n  --reporter                Reporter to use. Supported reporters: \"text\", \"junit\" and \"silent\" to supress output\n  --nofail                  Exit with error code 0 even if blacklisted licenses were found\n  --licenses                Print a list of valid license names that can be used in blacklist\n  --help                    Print help\n\nExamples:\n\n  Test that no \"beerware license\" dependency was used            $ licenseguard --blacklist Beerware\n  List of blacklisted licenses                                   $ licenseguard --blacklist beerware --blacklist AGPL-3.0\n  Ignore a dependency                                            $ licenseguard --ignore yargs@10.0.3\n  Ignore multiple dependencies                                   $ licenseguard --ignore yargs@10.0.3 --ignore doctrine@2.1.0\n```\n\n## The `licenseguardrc` file\n\nYou can configure blacklist and ignore dependencies in a `.licenseguardrc` file in the directory you wish to license test\n\n*Example*\n\n```json\n{\n    \"blacklist\": [\"Apache-2.0\", \"CC-BY-3.0\"],\n    \"ignore\": [\"rc@1.2.3\"]\n}\n```\n\nIgnores dependency `rc@1.2.3` and blacklists licenses `Apache-2.0`, `CC-BY-3.0`.\n\n## Valid License Ids\n\nYou can print a list of valid SPDX license ids `licenseguard --licenses`\n\n## Integration with Jenkins\n\nlicenseguard comes with an integrated JUnit reporter. You will need to install [JUnit Plugin](https://wiki.jenkins.io/display/JENKINS/JUnit+Plugin).\n\n*Add a build step*\n\nAdd a \"Execute Windows batch command\" or \"Execute shell\" build step and configure the command like this to use the `junit` reporter and pipe the output to a file.\n\n```bash\nlicenseguard --reporter junit \u003e licenseguard-results.xml\n```\n\n*Add a post build action*\n\nAdd a \"Publish JUnit test result report\" post build action and specify a file pattern matching the output file of the build step before.\n\nAfter you run a build you should see something like this in jenkins project\n\n![Test Result Trend](https://github.com/Softwarepark/licenseguard/blob/master/assets/jenkins-test-overview.png)\n\n![Test Result](https://github.com/Softwarepark/licenseguard/blob/master/assets/jenkins-test-detail.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrustbit%2Flicenseguard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrustbit%2Flicenseguard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrustbit%2Flicenseguard/lists"}