A Ruby gem to cache and verify the licenses of dependencies
Перейти к файлу
Kevin Dangoor d43366816f
Ensure that we don't have a vulnerability from cabal (#737)
* Ensure that we don't have a vulnerability from cabal

This makes sure we don't get a homepage URL from cabal that's too
long and causes a performance issue leading to a denial of service.

Fixes https://github.com/github/licensed/security/code-scanning/1
2024-08-13 13:37:05 -04:00
.github Bump actions/setup-java from 4.2.1 to 4.2.2 (#734) 2024-08-06 09:35:15 -04:00
.licenses/bundler Bump parallel from 1.25.1 to 1.26.2 (#736) 2024-08-13 13:28:08 -04:00
.vscode separate go and dep fixtures, test each separately 2022-11-25 14:45:06 -07:00
docs fix: broken hyperlink to docs in licensee repo 2023-06-27 02:40:36 +03:00
exe v1.0.0 2018-02-20 08:20:41 -07:00
lib Ensure that we don't have a vulnerability from cabal (#737) 2024-08-13 13:37:05 -04:00
script fix: typo in bundler script 2023-06-27 02:43:00 +03:00
test Update Pipfile to make test compatible with Python version in CI 2024-03-18 12:51:52 +00:00
.gitignore unignore gemfile.lock 2023-01-26 09:10:31 -07:00
.licensed.test.yml move test licensed yaml to .licensed.test.yml 2021-11-23 14:03:25 -07:00
.licensed.yml resolve license check failures 2022-12-22 15:09:40 -07:00
.rubocop.yml allow shorthand and legacy hash syntax 2022-12-22 15:30:41 -07:00
.ruby-version update .ruby-version to 3.1.3 2022-12-22 14:32:59 -07:00
CHANGELOG.md Ensure that we don't have a vulnerability from cabal (#737) 2024-08-13 13:37:05 -04:00
CODE_OF_CONDUCT.md v1.0.0 2018-02-20 08:20:41 -07:00
CONTRIBUTING.md update readme and contributing guide 2022-12-11 13:39:19 -07:00
Gemfile v1.0.0 2018-02-20 08:20:41 -07:00
Gemfile.lock Bump parallel from 1.25.1 to 1.26.2 (#736) 2024-08-13 13:28:08 -04:00
LICENSE Update Datum in LICENSE 2019-10-03 17:03:15 +02:00
README.md Update changelog for 4.5 (#735) 2024-08-13 13:27:45 -04:00
Rakefile remove packaging scripts and tooling 2022-12-11 13:24:36 -07:00
licensed.gemspec rewrite cocoapods source using cocoapods plugin 2023-03-19 20:12:35 -07:00

README.md

Licensed

Licensed caches the licenses of dependencies and checks their status, and is available as a Ruby gem.

Licensed is not a complete open source license compliance solution. Please understand the important disclaimer below to make appropriate use of Licensed.

Current Status

Build status

Licensed is currently in low maintenance mode. At this point, we're only looking to maintain this repository for security fixes.

Licensed v4 - Removed support for non-Ruby environments

Licensed v4 no longer provides a self-contained executable build of licensed. Please see the deprecation notice for more context.

Licensed v3

Licensed v3 includes a breaking change if both of the following are true:

  1. a project uses bundler to manage ruby dependencies
  2. a project uses the self-contained executable build of licensed

All other usages of licensed should not encounter any major changes migrating from the latest 2.x build to 3.0.

See CHANGELOG.md for more details on what's changed. See the v3 migration documentation for more info on migrating to v3.

Licensed v2

Licensed v2 includes many internal changes intended to make licensed more extensible and easier to update in the future. While not too much has changed externally, v2 is incompatible with configuration files and cached records from previous versions. Fortunately, migrating is easy using the licensed migrate command.

See CHANGELOG.md for more details on what's changed. See the v2 migration documentation for more info on migrating to v2, or run licensed help migrate.

Installation

Dependencies

Licensed uses the libgit2 bindings for Ruby provided by rugged. rugged requires cmake and pkg-config which you may need to install before you can install Licensed.

# Ubuntu
sudo apt-get install cmake pkg-config

# macOS
brew install cmake pkg-config

With Gemfile

Add this line to your application's Gemfile:

gem 'licensed', :group => 'development'

And then execute:

$> bundle

With Homebrew (on macOS)

brew install licensed

Usage

See getting started for guidance using Licensed as part of your developer workflow.

Available commands

See the commands documentation for documentation on available commands, or run licensed -h to see all of the current available commands.

Configuration options

A configuration file is required for most commands. See the configuration file documentation for more details on the configuration format and available configuration options.

Available dependency sources

Licensed can enumerate dependency for many languages, package managers, and frameworks. See the sources documentation for the list of currently available sources. Sources can be explicitly enabled and disabled as a configuration option.

Development

To get started after checking out the repo, run

  1. script/bootstrap to install dependencies
  2. script/setup to setup test fixtures.
  • script/setup -f will force a clean test fixture environment
  1. script/cibuild to run the tests

You can also run script/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then create a release on GitHub.

Adding a new source

See the documentation on adding new sources for detailed information on what's required to add a new dependency source enumerator.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/github/licensed. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct. See CONTRIBUTING for more details.

Disclaimer

Licensed is not a complete open source license compliance solution. Like any bug, licensing issues are far cheaper to fix if found early. Licensed is intended to provide automation around documenting the licenses of dependencies and whether they are configured to be allowed by a user of licensed, in other words, to surface the most obvious licensing issues early.

Licensed is not a substitute for human review of each dependency for licensing or any other issues. It is not the goal of Licensed or GitHub, Inc. to provide legal advice about licensing or any other issues. If you have any questions regarding licensing compliance for your code or any other legal issues relating to it, its up to you to do further research or consult with a professional.

License

The gem is available as open source under the terms of the MIT License.