feat: add license compliance scanning for GGUF models#188
Merged
Conversation
Extract license metadata from GGUF files, add license fields to the model catalog, and surface license details (commercial use, restrictions) in the CLI via catalog list/info, inspect, and a new license command. Closes #23 Signed-off-by: Christopher Maher <chris@mahercode.io>
549dc75 to
60ef5d2
Compare
Remove hardcoded license fields from the model catalog and instead rely on license metadata extracted from GGUF files at download time. This eliminates the maintenance burden of manually curating license info for every catalog entry. - Remove `license` field from all catalog models and the Model struct - Remove LICENSE column from `catalog list` and license section from `catalog info` - Rework `license check` to read from deployed k8s Model resources (Status.GGUF.License) with --namespace flag support - Normalize GGUF license strings via license.Normalize() in the controller before storing in status - Fix Normalize() false-matching "permit"/"limited" as "mit" - Update tests accordingly Signed-off-by: Defilan <defilan@users.noreply.github.com> Signed-off-by: Christopher Maher <chris@mahercode.io>
Signed-off-by: Defilan <defilan@users.noreply.github.com> Signed-off-by: Christopher Maher <chris@mahercode.io>
Covers license list output (table headers, known IDs) and license check with cluster integration (non-existent model, missing GGUF metadata, patched license status, unknown license handling). Signed-off-by: Christopher Maher <chris@mahercode.io>
…exist The license check e2e tests were in a separate top-level Describe block that ran before the Manager block installed CRDs, causing "no matches for kind Model" failures. Move cluster-dependent tests into the Manager Ordered block so they run after CRD installation and controller deployment. Signed-off-by: Christopher Maher <chris@mahercode.io>
6c39104 to
6c452e1
Compare
This was referenced Feb 26, 2026
Merged
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
general.licensefrom GGUF file metadata via the parserLicensefield toGGUFMetadatain the Model CRDpkg/licensepackage with license database andNormalize()functionllmkube license checkcommand that reads license from deployed k8s Model resourcesllmkube license listcommand to browse known licensesllmkube inspectoutput from GGUF file metadataCloses #23
Test plan
go test ./pkg/license/...— license database lookup, normalization, propertiesgo test ./pkg/gguf/...— GGUF parser license extractiongo test ./pkg/cli/...— catalog and CLI integrationlicense list— table headers, known license IDs and names, help docslicense check— non-existent model error, missing GGUF metadata message, patched license status output, unknown license handlingllmkube catalog list— no LICENSE columnllmkube catalog info llama-3.1-8b— no license sectionllmkube inspect <model.gguf>— shows license from file metadatallmkube license list— shows known license typesllmkube license check <model-name>— reads license from deployed model