MCPcopy Index your code
hub / github.com/anchore/grant

github.com/anchore/grant @v0.6.7

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.6.7 ↗ · + Follow
311 symbols 806 edges 43 files 212 documented · 68%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Grant logo

Grant

A CLI tool and Go library for checking licenses in container images, SBOMs, and filesystems. Works seamlessly with Syft for license investigation and policy enforcement.

Validations Go Report Card GitHub release GitHub go.mod Go version License: Apache-2.0 Join our Discourse

grant-demo

Features

  • Check licenses in container images, SBOMs, and filesystems
  • Categorize licenses by risk level (permissive, weak copyleft, strong copyleft)
  • Define and enforce license policies with allow/deny lists
  • Works seamlessly with Syft SBOMs
  • Multiple output formats (table, JSON) for CI/CD integration

[!TIP] New to Grant? Check out the Getting Started guide for a walkthrough!

Installation

The quickest way to get up and going:

curl -sSfL https://get.anchore.io/grant | sudo sh -s -- -b /usr/local/bin

[!TIP] See Installation docs for more ways to get Grant!

The basics

List licenses within a container image or directory:

# container image
grant list redis:latest

# directory
grant list dir:.

# SBOM document
grant list sbom.spdx.json

Check licenses against a policy:

grant check redis:latest

[!TIP] Check out the Getting Started guide to explore all of the capabilities and features.

Want to define license policies? Check out the policy guide.

Contributing

We encourage users to help make these tools better by submitting issues when you find a bug or want a new feature. Check out our contributing overview and developer-specific documentation if you are interested in providing code contributions.

Grant development is sponsored by Anchore, and is released under the Apache-2.0 License.

For commercial support options, please contact Anchore.

Core symbols most depended-on inside this repo

Close
called by 13
grant/case.go
NewOutput
called by 11
cmd/grant/cli/internal/output.go
OutputJSON
called by 11
cmd/grant/cli/internal/output.go
String
called by 10
grant/license.go
IsLicensePermitted
called by 10
grant/policy.go
IsHigh
called by 9
internal/spdxlicense/license.go
GetLicenseByID
called by 8
internal/spdxlicense/license.go
IsPackageIgnored
called by 7
grant/policy.go

Shape

Function 203
Method 57
Struct 45
TypeAlias 4
Class 2

Languages

Go99%
Java1%

Modules by API surface

grant/case.go30 symbols
grant/response.go24 symbols
cmd/grant/cli/command/list.go23 symbols
cmd/grant/cli/command/check.go19 symbols
cmd/grant/cli/internal/progress.go16 symbols
cmd/grant/cli/internal/output.go16 symbols
internal/log/log.go14 symbols
grant/orchestrator.go12 symbols
internal/spdxlicense/license.go10 symbols
cmd/grant/cli/command/config.go10 symbols
grant/evaluation_test.go9 symbols
grant/evaluation.go9 symbols

For agents

$ claude mcp add grant \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact