Skip to main content
License Compliance Checker: dependency license scanner and SBOM generator

License Compliance Checker (LCC)

Know what you ship. Know what you owe.

PyPI CI Documentation License: Apache 2.0 Python 3.11+ EU AI Act Article 53 No telemetry


License Compliance Checker (LCC) scans a project's dependencies for licenses, checks them against a policy, and writes CycloneDX and SPDX SBOMs. It can also write an EU AI Act Article 53 documentation pack for the AI models it finds. Apache 2.0, AS IS.

LCC is an engineering tool. It is not legal advice and it does not decide whether you meet any law. Its output is evidence for your own review.

Every command on this page was run on version 2.0.3 with Python 3.11.


What it is for

Most projects ship code they did not write: packages, and now AI models and datasets. Each one comes with license terms. LCC answers one question from the command line or in CI:

Which licenses are in this project, and does any of them break our policy?

Article 53 of the EU AI Act (Regulation (EU) 2024/1689) sets documentation and copyright obligations for providers of general-purpose AI models. LCC can write a starting pack of documents for that work. See EU AI Act Article 53 pack for what the pack does and does not cover.

Built by AI Exponent LLC.


Quick Start

LCC needs Python 3.11 or newer.

pip install license-compliance-checker

Run it in a folder that has a manifest such as requirements.txt or package.json:

# 1. Scan the project and print a table
lcc scan .

# 2. Save the scan as a JSON report
lcc scan . --format json --output scan-report.json

# 3. Write a CycloneDX or SPDX SBOM from that report
lcc sbom generate scan-report.json --format cyclonedx --output sbom.json
lcc sbom generate scan-report.json --format spdx --output sbom.spdx.json

# 4. Scan against a built-in policy
lcc policy list
lcc scan . --policy permissive

# 5. Write the EU AI Act Article 53 pack
lcc compliance-pack .

Output of step 1 on a project with two pinned packages:

                          License Compliance Findings
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
┃ Status ┃ Component           ┃ License    ┃ Confidence ┃ Project Root        ┃
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩
│ PASS   │ python:requests@2.… │ Apache-2.0 │       0.70 │ /path/to/project    │
│ PASS   │ python:fastapi@0.1… │ MIT        │       0.70 │ /path/to/project    │
└────────┴─────────────────────┴────────────┴────────────┴─────────────────────┘
Licenses
├── Apache-2.0 (1)
│   └── python:requests@2.32.3
└── MIT (1)
    └── python:fastapi@0.111.0
Scanned 2 components in 0.01s • No violations detected

LCC also prints a few INFO and WARNING log lines before the table. They are normal.


How it works

graph LR
    A["Project folder<br/><em>manifests, lock files, model files</em>"] --> B["Detectors<br/><em>find components</em>"]
    B --> C["Resolvers<br/><em>look up each license</em>"]
    C --> D["Policy check<br/><em>YAML policy, optional OPA server</em>"]
    D --> E["Outputs<br/><em>table, JSON report, SBOM, reports, Article 53 pack</em>"]

    style A fill:#F5F4EF,stroke:#E4E2DC,color:#0F1419
    style B fill:#E6F4F1,stroke:#0D5463,color:#0D5463
    style C fill:#E6F4F1,stroke:#0D5463,color:#0D5463
    style D fill:#FAF0E6,stroke:#B68A2E,color:#0F1419
    style E fill:#F5F4EF,stroke:#E4E2DC,color:#0F1419
  1. Detectors read manifests and lock files and list the components.
  2. Resolvers look up each component's license. By default they ask public sources over the network: package registries, ClearlyDefined, GitHub and the Hugging Face Hub.
  3. The policy check marks each component as pass, warning or violation.
  4. Outputs are written from the same scan result.

What LCC does

  • Dependency license scan for Python, JavaScript and TypeScript, Go, Java (Maven and Gradle), Rust, Ruby and .NET. See Supported ecosystems.
  • SBOM generation in CycloneDX 1.5 and SPDX 2.3.
  • Policy check with seven built-in YAML policies, or your own policy file.
  • AI model and dataset detection: Hugging Face model references in code, local model files, and Hugging Face dataset references. Read the known limitations before you rely on a model license result.
  • EU AI Act Article 53 pack: four files that record what LCC could and could not find for each AI model.
  • Reports in JSON, Markdown, HTML and CSV, plus an attribution file.

Output formats

Output Command Formats
Scan result lcc scan Console table, JSON
SBOM, CycloneDX 1.5 lcc sbom generate --format cyclonedx JSON, XML (--sbom-format xml)
SBOM, SPDX 2.3 lcc sbom generate --format spdx JSON, tag-value (--sbom-format tag-value)
Report lcc report generate JSON, Markdown, HTML, CSV
Attribution file lcc report generate --format attribution Plain text
Article 53 assessment lcc assess Console, JSON, HTML
Article 53 pack lcc compliance-pack A folder with four files

Sample outputs

CycloneDX 1.5 SBOM (JSON)

Real output of lcc sbom generate on the two-package project above. The properties block of each component and the bom-ref values are cut for length.

{
  "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
  "bomFormat": "CycloneDX",
  "specVersion": "1.5",
  "serialNumber": "urn:uuid:81467af2-0c6f-4589-a5c1-38b5fd2781c8",
  "version": 1,
  "metadata": {
    "timestamp": "2026-11-14T17:53:02.834497+00:00",
    "tools": [
      {
        "name": "license-compliance-checker",
        "vendor": "LCC Contributors",
        "version": "2.0.3"
      }
    ]
  },
  "components": [
    {
      "type": "library",
      "name": "fastapi",
      "version": "0.111.0",
      "purl": "pkg:pypi/fastapi@0.111.0",
      "licenses": [{ "license": { "id": "MIT" } }]
    },
    {
      "type": "library",
      "name": "requests",
      "version": "2.32.3",
      "purl": "pkg:pypi/requests@2.32.3",
      "licenses": [{ "license": { "id": "Apache-2.0" } }]
    }
  ]
}
Built-in policy (start of lcc policy show permissive)
{
  "name": "permissive",
  "version": "1.0",
  "description": "Permissive baseline policy that flags copyleft and non-OSI licenses for review.",
  "default_context": "internal",
  "contexts": {
    "internal": {
      "allow": ["MIT", "Apache-2.0", "BSD-*", "ISC", "CC0-1.0"],
      "deny": ["SSPL-1.0"],
      "review": ["GPL-*", "AGPL-*", "LGPL-*"]
    }
  }
}

The full policy has more contexts and a reason for each rule.

Article 53 pack (folder contents)
eu-ai-act-compliance-pack-<timestamp>/
  copyright_policy_template.md
  eu_ai_act_report.html
  eu_ai_act_report.json
  training_data_summary.json

CI integration and exit codes

# .github/workflows/license-check.yml
name: License check
on: [pull_request, push]

jobs:
  license-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - run: pip install license-compliance-checker
      - name: Scan
        run: lcc scan . --policy permissive --format json --output scan-report.json
      - name: Write CycloneDX SBOM
        if: always()
        run: lcc sbom generate scan-report.json --format cyclonedx --output sbom.json
      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: license-artifacts
          path: |
            scan-report.json
            sbom.json

Exit codes of lcc scan

Exit code Meaning
0 The scan finished and found no violations.
1 The policy could not be loaded, for example a policy name or file that does not exist.
2 The scan finished and found at least one violation. The report is still written. An invalid command-line option also exits with 2.

A violation is any of these: a policy rule marks a component as a violation, a license could not be resolved, or the confidence of a result is below --threshold.

So lcc scan . --policy eu-ai-act-compliance exits with 2 and still prints a full report when the policy flags a component. That is the intended result, not an error.

lcc policy test <name> <report.json> uses 2 for violations and 3 for warnings only.


CLI command reference

Command What it does
lcc scan [PATH] Scan a project folder. Options include --format, --output, --policy, --context, --recursive, --exclude, --offline, --include-transitive.
lcc sbom generate REPORT --output FILE Write a CycloneDX or SPDX SBOM from a JSON scan report.
lcc sbom validate FILE Check the structure of an SBOM file.
lcc report generate PATH Write a JSON, Markdown, HTML, CSV or attribution report.
lcc policy list List the available policies.
lcc policy show NAME Print a policy.
lcc policy export NAME FILE Copy a policy to a file you can edit.
lcc policy validate FILE Check a policy file.
lcc policy test NAME REPORT Evaluate a policy against a JSON scan report.
lcc assess PATH Run the Article 53 assessment on a project or a JSON report.
lcc compliance-pack PATH Write the Article 53 pack.
lcc server Run the REST API (default 127.0.0.1:8000).
lcc --version Print the installed version.

Run lcc <command> --help for every option.


Policies

LCC ships seven policies: permissive, copyleft-friendly, ai-ml-permissive, ai-ml-research, ai-ml-strict, eu-ai-act-compliance and nist-ai-rmf.

# Use a built-in policy
lcc scan . --policy permissive

# Start your own policy from a built-in one
lcc policy export permissive ./my-policy.yml
lcc policy validate ./my-policy.yml
lcc scan . --policy ./my-policy.yml

# Pick the usage context the policy should apply
lcc scan . --policy permissive --context saas

LCC can also ask an Open Policy Agent server for the decision. Set LCC_OPA_URL to the server address. A sample Rego policy is in policy/rego/license_policy.rego. See the Policy Guide.


AI models and datasets

A plain lcc scan . also looks for AI components. There is no separate flag or command for it.

  • Hugging Face model references in code, such as from_pretrained("org/model"). LCC asks the Hugging Face Hub for the model's license.
  • Local model folders and files: Hugging Face model folders, and .gguf and .onnx files.
  • Hugging Face dataset references, matched against a built-in list of dataset licenses.

Model components appear in the scan table, the JSON report and the SBOM (CycloneDX type machine-learning-model).


EU AI Act Article 53 pack

# Assessment only
lcc assess . --format html --output eu-ai-act.html

# Full pack: a timestamped folder with four files
lcc compliance-pack .

For each AI model found in the scan, the assessment lists the Article 53 obligations it checks, with a status (met, partial, not_met or not_applicable), the evidence found and the gaps.

What the pack is:

  • A record of what LCC could find in your repository and in the model's public metadata.
  • A copyright policy template and a training data summary file for you to complete.

What the pack is not:

  • It is not a legal determination, and a met status does not mean you meet Article 53.
  • Article 53 applies to providers of general-purpose AI models. If you only use a model, your obligations are different.

Supported ecosystems

Ecosystem Files detected
Python requirements.txt, pyproject.toml, setup.py, Pipfile, poetry.lock, environment.yml. Files named requirements-*.txt are read only when one of these is also present.
JavaScript and TypeScript package.json, package-lock.json, yarn.lock, pnpm-lock.yaml
Go go.mod, go.sum
Java (Maven) pom.xml
Java and Kotlin (Gradle) build.gradle, build.gradle.kts
Rust Cargo.toml, Cargo.lock
Ruby Gemfile, Gemfile.lock
.NET *.csproj, *.fsproj, *.vbproj, packages.config

Web Dashboard

LCC includes a Next.js dashboard that runs locally with Docker:

git clone https://github.com/aiexponent/license-compliance-checker
cd license-compliance-checker
docker-compose up -d

Open http://localhost:3000 to explore scan results. See the Deployment and Dashboard Guide.


Known Limitations

  • Gated Hugging Face models. When the Hub lookup fails, the license shown for the model is not reliable. See the warning under AI models and datasets.
  • Network use. A scan looks up licenses online. With --offline, LCC skips the license lookup calls, and a license it cannot find locally is shown as UNRESOLVED, which counts as a violation. --offline does not turn off the policy server: if LCC_OPA_URL is set, the policy check still sends component names, licenses and confidence scores to that server.
  • Missing folder. lcc scan on a path that does not exist reports zero components and exits with 0.
  • Transitive dependencies need --include-transitive and a lock file (poetry.lock or package-lock.json).
  • Confidence. Each result has a confidence score. Treat a low score as a prompt to check the license yourself.
  • Article 53. The assessment checks documentation that LCC can find. It is not a legal determination.

Documentation

Full documentation is available on the live Material for MkDocs Documentation Portal:


Releases

Version Highlights
v2.0.3 Fixes the license shown for a model referenced by its Hugging Face ID: it no longer takes the scanned project's license when the Hub lookup gives none (for example a gated model).
v2.0.2 Fixes lcc sbom generate on the report written by lcc scan --format json (2.0.1 produced an SBOM with no components), records the real LCC version in SBOMs, and honours --project-name and --project-version.
v2.0.1 Hard-gated type checking in CI (0 errors across 99 files), Python 3.13 matrix, live Material for MkDocs portal, 8-format Supported Export Formats, reciprocal 5-tool ecosystem footer, flat-square badges & Dependabot.
v2.0.0 Major release: OPA Rego policy engine, EU AI Act Article 53 compliance packs, CycloneDX 1.5 & SPDX 2.3 SBOM generation, AI model & GGUF/ONNX detection.
v1.0.0 Initial release of multi-ecosystem dependency license scanner.

Contributing

See CONTRIBUTING.md. Issues and PRs welcome.

git clone https://github.com/aiexponent/license-compliance-checker
cd license-compliance-checker
pip install -e ".[all,test]"
pytest

Privacy

LCC has no telemetry and no usage tracking. With the default settings, your source code, reports and SBOMs stay on your machine.

A scan does send some data out:

  • License lookups (on by default). Package names and versions, and Hugging Face model names, go to public sources: package registries, ClearlyDefined, GitHub and the Hugging Face Hub. Use --offline to skip these calls.
  • Policy server (only if you set LCC_OPA_URL). Component names, licenses and confidence scores go to the OPA server you configured. --offline does not turn this off.
  • LLM analysis (off by default). If you install the ai extra and set LCC_LLM_PROVIDER, LCC sends text from your files, up to 2,000 characters per request, to that provider. This is file content, not only package names.

License

Apache 2.0. Free to use, modify, and distribute.

Built by AI Exponent LLC. Contact: hello@aiexponent.com


Part of the AiExponent open-source AI governance toolchain:
litmusai (Art. 5) · license-compliance-checker (Art. 53) · rag-benchmarking (Art. 15) · riskforge (Art. 9) · agentic-document-analyser (Art. 9 / Annex IV)


aiexponent.com · hello@aiexponent.com · Built in the open · Apache 2.0

Metadata

Release files for license-compliance-checker 2.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for license-compliance-checker 2.0.3
File Size Uploaded Provenance Actions
license_compliance_checker-2.0.3.tar.gz 203.6 kB With provenance Details for license_compliance_checker-2.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for license-compliance-checker 2.0.3
File Interpreter ABI Platform Actions
license_compliance_checker-2.0.3-py3-none-any.whl Python 3 none any Details for license_compliance_checker-2.0.3-py3-none-any.whl

Total release size: 472.0 kB

Release files / license_compliance_checker-2.0.3.tar.gz

Download URL license_compliance_checker-2.0.3.tar.gz
Size 203.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d688014adb5fbb1299db8ecabfcce1ef7f41472de3a138cf1425286addbcd47c
BLAKE2b-256 checksum
How to use checksums
06b77039bce713d62cc374d58faac2cd9db3392bc7474d84825a850c32978a72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / license_compliance_checker-2.0.3-py3-none-any.whl

Download URL license_compliance_checker-2.0.3-py3-none-any.whl
Size 268.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0f8d79b7a2279e1f6081738efb4fddc5cefe7fc3ad9791ff0e221829c31da70
BLAKE2b-256 checksum
How to use checksums
906d610383e1b63e2b00ffcc5c63ec7ad6666db2b5c6f21fb09b5b1b6c13f177
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for license-compliance-checker 2.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for license_compliance_checker-2.0.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page