Dependencies

Dependencies

class ghastoolkit.Dependencies(iterable=(), /)

List of Dependencies.

applyClearlyDefined()

Reachout to ClearlyDefinded API, get the licenses for a component, and update all the Dependencies.

applyLicenses(licenses: Licenses)

Given a list of licenses (Licenses) apply a license.

contains(dependency: Dependency) bool

Contains the dependency.

exportBOM(tool: str, path: str, sha: str = '', ref: str = '', version: str = '0.0.0', url: str = '') dict

Create a dependency graph submission JSON payload for GitHub.

find(name: str) Dependency | None

Find by name.

findLicenses(licenses: list[str]) Dependencies

Find dependencies with a given license.

findNames(names: list[str]) Dependencies

Find by Name using wildcards.

findPurl(purl: str) Dependency | None

Find by PURL.

findUnknownLicenses(licenses: list[str] | None = None) Dependencies

Find all the dependencies with no licensing information.

updateDependencies(dependencies: Dependencies)

Update a list of dependencies.

updateDependency(dependency: Dependency)

Update a dependency in our list with the incoming information.