{"id":33117643,"url":"https://github.com/ubersan/pylic","last_synced_at":"2026-01-25T09:38:40.593Z","repository":{"id":39852162,"uuid":"340355283","full_name":"ubersan/pylic","owner":"ubersan","description":"A Python license checker","archived":false,"fork":false,"pushed_at":"2025-03-19T21:34:05.000Z","size":403,"stargazers_count":16,"open_issues_count":10,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-05T21:42:38.463Z","etag":null,"topics":["cli","license-checking","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubersan.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,"zenodo":null}},"created_at":"2021-02-19T11:57:21.000Z","updated_at":"2025-05-12T23:36:35.000Z","dependencies_parsed_at":"2024-06-20T23:25:06.805Z","dependency_job_id":"0cbf5dde-e68e-4b73-ba0d-8f537733518c","html_url":"https://github.com/ubersan/pylic","commit_stats":{"total_commits":200,"total_committers":6,"mean_commits":"33.333333333333336","dds":"0.030000000000000027","last_synced_commit":"c09b4a0b16fbb3cb1dcfbc09b7066fa9476d42f2"},"previous_names":["sandrochuber/pylic"],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/ubersan/pylic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubersan%2Fpylic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubersan%2Fpylic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubersan%2Fpylic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubersan%2Fpylic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubersan","download_url":"https://codeload.github.com/ubersan/pylic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubersan%2Fpylic/sbom","scorecard":{"id":906339,"data":{"date":"2025-08-11","repo":{"name":"github.com/ubersan/pylic","commit":"6bd50cc260d66b5a8dce99fc20da7020aeff1272"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 1/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-publish.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/ubersan/pylic/pypi-publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pypi-publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/ubersan/pylic/pypi-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/ubersan/pylic/pypi-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-version-integration-tests.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/ubersan/pylic/python-version-integration-tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/python-version-integration-tests.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/ubersan/pylic/python-version-integration-tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-version-integration-tests.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/ubersan/pylic/python-version-integration-tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/quality.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/ubersan/pylic/quality.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/quality.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/ubersan/pylic/quality.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/quality.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/ubersan/pylic/quality.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pypi-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/python-version-integration-tests.yml:1","Warn: no topLevel permission defined: .github/workflows/quality.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T17:29:47.932Z","repository_id":39852162,"created_at":"2025-08-24T17:29:47.932Z","updated_at":"2025-08-24T17:29:47.932Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28750880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T09:00:19.176Z","status":"ssl_error","status_checked_at":"2026-01-25T09:00:04.131Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","license-checking","python"],"created_at":"2025-11-15T03:00:27.336Z","updated_at":"2026-01-25T09:38:40.586Z","avatar_url":"https://github.com/ubersan.png","language":"Python","funding_links":[],"categories":["Software"],"sub_categories":["Tools \u0026 libs"],"readme":"# pylic - Python license checker [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/sandrochuber/pylic/blob/main/LICENSE) [![PyPI version](https://badge.fury.io/py/pylic.svg)](https://badge.fury.io/py/pylic/)\n\nA Python license checker. `pylic` is [PEP-639](https://peps.python.org/pep-0639/)-compliant and supports the [SPDX License Expression syntax](https://peps.python.org/pep-0639/#spdx-license-expression-syntax).\n\n## Principles:\n\n- All licenses of all installed packages are relevant.\n- All installed packages without a license are considered unsafe and have to be listed as such.\n- Every license has to be allowed explicitly.\n\n## Installation\n\n```sh\npip install pylic\n```\n\n## Configuration\n\n`pylic` needs be run in the directory where your `pyproject.toml` file is located. You can configure\n\n- `safe_licenses`: All licenses you consider safe for usage. The string comparison is case-insensitive.\n- `unsafe_packages`: List packages that have no license or use licenses not considered safe.\n\n```toml\n[tool.pylic]\nsafe_licenses = [\n    \"Apache Software License\",\n    \"Apache License 2.0\",\n    \"MIT License\",\n    \"Python Software Foundation License\",\n    \"Mozilla Public License 2.0 (MPL 2.0)\",\n]\nunsafe_packages = [\n    \"unsafe_package\",\n]\n```\n\n## Commands\n\n`pylic` provides the following commands (also see `pylic --help`):\n\n- `check`: Checks all installed licenses.\n- `list`: Lists all installed packages and their corresponding license.\n\n## Usage Example\n\nCreate a venv to start with a clean ground and activate it\n\n```sh\npython -m venv .venv\nsource .venv/bin/activate\n```\n\nInstall `pylic` and create an empty `pyproject.toml`\n\n```sh\npip install pylic\ntouch pyproject.toml\n```\n\nInstall all your dependencies\n\n```sh\npip install \u003cpackageA\u003e \u003cpackageB\u003e\n```\n\nRun pylic\n\n```sh\npylic check\n```\n\nThe output will be similar to\n\n```sh\nFound unsafe packages:\n  pkg_resources (0.0.0)\nFound unsafe licenses:\n  pip (18.1): MIT License\n  zipp (3.4.1): MIT License\n  toml (0.10.2): MIT License\n  pylic (1.2.0): MIT License\n  setuptools (40.8.0): MIT License\n  typing-extensions (3.7.4.3): Python Software Foundation License\n  importlib-metadata (3.9.0): Apache Software License\n```\n\nThe return code of `pylic` is in this case non-zero due to unsafe licenses. This allows usage of pylic in CI.\n\n```sh\necho $? # prints 1\n```\n\nAs these licenses and packages are all ok we can configure `pylic` accordingly\n\n```sh\ncat \u003c\u003cEOT \u003e\u003e pyproject.toml\n[tool.pylic]\nsafe_licenses = [\"Apache Software License\", \"MIT License\", \"Python Software Foundation License\"]\nunlicensed_packages = [\"pkg_resources\"]\nEOT\n```\n\nAfter rerunning `pylic check` the output now reveals a successful validation\n\n```sh\n✨ All licenses ok ✨\n```\n\nAlso the return code now signals that all is good\n\n```sh\necho $? # prints 0\n```\n\nUse `pylic list` to list all installed packages and their corresponding licenses.\n\n## Advanced Usage\n\nIn cases where the safe licenses or unsafe packages are centrally managed keeping the configuration in perfect sync to the installed packages might be too cumbersome or even impossible. To support these use cases the `check` command provides the two options (see also `check --help`) `--allow-extra-safe-licenses` and `--allow-extra-unsafe-packages`. These options only affect the returned status code and will keep all corresponding warnings unchanged.\n\n## Pre-commit\n\n`pylic` provides a [pre-commit](https://pre-commit.com/) integration. Follow the [instructions](https://pre-commit.com/#quick-start) and enable automatic license checking on commits by adding\n\n```sh\n-  repo: https://github.com/ubersan/pylic\n   rev: v\u003cversion\u003e\n   hooks:\n   -  id: pylic\n```\n\nto your `.pre-commit-config.yaml` file.\n\n## Development\n\nRequired tools:\n\n- uv (https://docs.astral.sh/uv/)\n\nRun `uv sync` to install all necessary dependencies. Checkout the `[tool.taskipy.tasks]` (see [taskipy](https://github.com/illBeRoy/taskipy)) section in the `pyproject.toml` file for utility tasks. You can run these with `uv run task \u003ctask\u003e`.\n\nCreating a new release is as simple as:\n\n- Update `version` in the pyproject.toml and the `__version__.py` file.\n- Run `git tag \u003cnew-version\u003e`.\n- Run `git push origin \u003cnew-version\u003e`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubersan%2Fpylic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubersan%2Fpylic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubersan%2Fpylic/lists"}