plugin

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "syft-detector"

Name is the plugin's identity. It MUST equal the "id" field in bomly-plugin.json — Bomly refuses to load a plugin whose manifest id and runtime descriptor name disagree. It is also the descriptor name the Bomly CLI composition keys on when it embeds this detector ("syft-detector").

Variables

This section is empty.

Functions

func GraphContainerFromSBOM

func GraphContainerFromSBOM(s *syftsbom.SBOM, manager sdk.PackageManager) (*sdk.GraphContainer, error)

GraphContainerFromSBOM converts a Syft SBOM into one or more manifest-scoped graphs.

func IsBuiltin

func IsBuiltin() bool

IsBuiltin reports whether the Syft detector is compiled with the Syft library.

func Module

func Module() sdk.Module

Module packages the detector for both execution modes. The Bomly CLI composition embeds the Detector type directly and injects SupportedManagers and SupportedEcosystems from its own support catalog; managed execution uses this module, which sources the same axes from the package's own support table (packageManagerSupport).

Types

type Detector

type Detector struct {
	Logger              *zap.Logger
	WorkingDir          string
	SupportedEcosystems []sdk.Ecosystem
	SupportedManagers   []sdk.PackageManager
}

Detector resolves dependency graphs through the Syft Go library (builtin) or the syft CLI binary (external).

func (Detector) Applicable

func (d Detector) Applicable(ctx context.Context, req sdk.DetectionRequest) (bool, error)

Applicable reports whether Syft should run for the requested project.

func (Detector) Descriptor

func (d Detector) Descriptor() sdk.DetectorDescriptor

Descriptor describes the Syft-backed detector.

func (Detector) PackageManagerSupport

func (d Detector) PackageManagerSupport() []sdk.PackageManagerSupport

PackageManagerSupport returns Syft package-manager discovery metadata.

func (Detector) Ready

func (d Detector) Ready(context.Context, sdk.DetectionRequest) error

Ready reports whether the detector is ready to run.

func (Detector) ResolveGraph

func (d Detector) ResolveGraph(ctx context.Context, req sdk.DetectionRequest) (sdk.DetectionResult, error)

ResolveGraph resolves a dependency graph by invoking the Syft Go library.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL