vexy.sources

Submodules

Package Contents

Classes

BaseSource

Helper class that provides a standard way to create an ABC using

OssIndexSource

Helper class that provides a standard way to create an ABC using

OsvSource

Helper class that provides a standard way to create an ABC using

Attributes

ALL_SOURCES

class vexy.sources.BaseSource(*, config: Dict[str, Any] | None = None)[source]

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

property all_components: Set[cyclonedx.model.component.Component]
property valid_components: Set[cyclonedx.model.component.Component]
process_components(*, components: Iterable[cyclonedx.model.component.Component]) None[source]
abstract get_vulnerabilities() Set[cyclonedx.model.vulnerability.Vulnerability][source]
abstract _component_complete_for_source(*, component: cyclonedx.model.component.Component) bool[source]

Whether the given Component has enough data (the right fields) for us to query this data source for known vulnerabilities.

Parameters:

component – Component

Returns:

bool

abstract _configure_source(*, config: Dict[str, Any]) None[source]

Perform any source specific configuration such as authentication.

Parameters:

config – Dict[str, Any]

Returns:

None

abstract static source() cyclonedx.model.vulnerability.VulnerabilitySource[source]

Instance that represents this data source.

Returns:

VulnerabilitySource

abstract static source_name() str[source]

Human-friendly name for this data source.

Returns:

str

abstract static source_description() str[source]

Human-friendly description of this data source.

Returns:

str

abstract static source_ecosystems() Set[vexy.EcoSystem][source]

Which ecosystems this source has vulnerability data for.

Returns:

Set[str]

abstract static source_url() str[source]

Public URL for this data source

Returns:

str

class vexy.sources.OssIndexSource(*, config: Dict[str, Any] | None = None)[source]

Bases: vexy.sources.base.BaseSource

Helper class that provides a standard way to create an ABC using inheritance.

_component_complete_for_source(component: cyclonedx.model.component.Component) bool[source]

Whether the given Component has enough data (the right fields) for us to query this data source for known vulnerabilities.

Parameters:

component – Component

Returns:

bool

_configure_source(config: Dict[str, Any]) None[source]

Perform any source specific configuration such as authentication.

Parameters:

config – Dict[str, Any]

Returns:

None

get_vulnerabilities() Set[cyclonedx.model.vulnerability.Vulnerability][source]
static source() cyclonedx.model.vulnerability.VulnerabilitySource[source]

Instance that represents this data source.

Returns:

VulnerabilitySource

static source_name() str[source]

Human-friendly name for this data source.

Returns:

str

static source_description() str[source]

Human-friendly description of this data source.

Returns:

str

static source_ecosystems() Set[vexy.EcoSystem][source]

Which ecosystems this source has vulnerability data for.

Returns:

Set[str]

static source_url() str[source]

Public URL for this data source

Returns:

str

class vexy.sources.OsvSource(*, config: Dict[str, Any] | None = None)[source]

Bases: vexy.sources.base.BaseSource

Helper class that provides a standard way to create an ABC using inheritance.

get_vulnerabilities() Set[cyclonedx.model.vulnerability.Vulnerability][source]
_component_complete_for_source(*, component: cyclonedx.model.component.Component) bool[source]

Whether the given Component has enough data (the right fields) for us to query this data source for known vulnerabilities.

Parameters:

component – Component

Returns:

bool

_configure_source(*, config: Dict[str, Any]) None[source]

Perform any source specific configuration such as authentication.

Parameters:

config – Dict[str, Any]

Returns:

None

static source() cyclonedx.model.vulnerability.VulnerabilitySource[source]

Instance that represents this data source.

Returns:

VulnerabilitySource

static source_name() str[source]

Human-friendly name for this data source.

Returns:

str

static source_description() str[source]

Human-friendly description of this data source.

Returns:

str

static source_ecosystems() Set[vexy.EcoSystem][source]

Which ecosystems this source has vulnerability data for.

Returns:

Set[str]

static source_url() str[source]

Public URL for this data source

Returns:

str

vexy.sources.ALL_SOURCES: Dict[str, Type[base.BaseSource]][source]