list

package
v2.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const ProfileBSIV11 = "bsiv11"

ProfileBSIV11 is the profile key for BSI TR-03183-2 v1.1.

View Source
const ProfileBSIV20 = "bsiv20"

ProfileBSIV20 is the profile key for BSI TR-03183-2 v2.0.

View Source
const ProfileBSIV21 = "bsiv21"

ProfileBSIV21 is the profile key for BSI TR-03183-2 v2.1.

View Source
const ProfileFSCT = "fsct"

ProfileFSCT is the profile key for FSCT Framing 3rd Edition.

View Source
const ProfileInterlynk = "interlynk"

ProfileInterlynk is the profile key for the Interlynk scoring profile.

View Source
const ProfileNTIA = "ntia"

ProfileNTIA is the profile key for NTIA Minimum Elements (2021).

Variables

This section is empty.

Functions

func IsKnownFeature added in v2.0.7

func IsKnownFeature(key string) bool

IsKnownFeature reports whether key is a recognised generic feature name or alias. This is used by the CLI to validate --feature values before dispatching.

func LookupBSIV11CompExtractor added in v2.0.6

func LookupBSIV11CompExtractor(feature string) (extractors.CompExtractor, bool)

LookupBSIV11CompExtractor returns the BSI v1.1 per-component extractor for the given feature key.

func LookupBSIV11DocExtractor added in v2.0.6

func LookupBSIV11DocExtractor(feature string) (extractors.DocExtractor, bool)

LookupBSIV11DocExtractor returns the BSI v1.1 document-level extractor for the given feature key.

func LookupBSIV20CompExtractor added in v2.0.6

func LookupBSIV20CompExtractor(feature string) (extractors.CompExtractor, bool)

LookupBSIV20CompExtractor returns the BSI v2.0 per-component extractor for the given feature key.

func LookupBSIV20DocExtractor added in v2.0.6

func LookupBSIV20DocExtractor(feature string) (extractors.DocExtractor, bool)

LookupBSIV20DocExtractor returns the BSI v2.0 document-level extractor for the given feature key.

func LookupBSIV21CompExtractor added in v2.0.6

func LookupBSIV21CompExtractor(feature string) (extractors.CompExtractor, bool)

LookupBSIV21CompExtractor returns the BSI v2.1 per-component extractor for the given feature key.

func LookupBSIV21DocExtractor added in v2.0.6

func LookupBSIV21DocExtractor(feature string) (extractors.DocExtractor, bool)

LookupBSIV21DocExtractor returns the BSI v2.1 document-level extractor for the given feature key.

func LookupFSCTCompExtractor added in v2.0.6

func LookupFSCTCompExtractor(feature string) (extractors.CompExtractor, bool)

LookupFSCTCompExtractor returns the FSCT per-component extractor for the given feature key.

func LookupFSCTDocExtractor added in v2.0.6

func LookupFSCTDocExtractor(feature string) (extractors.DocExtractor, bool)

LookupFSCTDocExtractor returns the FSCT document-level extractor for the given feature key.

func LookupInterlynkCompExtractor added in v2.0.6

func LookupInterlynkCompExtractor(feature string) (extractors.CompExtractor, bool)

LookupInterlynkCompExtractor returns the Interlynk per-component extractor for the given feature key.

func LookupInterlynkDocExtractor added in v2.0.6

func LookupInterlynkDocExtractor(feature string) (extractors.DocExtractor, bool)

LookupInterlynkDocExtractor returns the Interlynk document-level extractor for the given feature key.

func LookupNTIACompExtractor added in v2.0.6

func LookupNTIACompExtractor(feature string) (extractors.CompExtractor, bool)

LookupNTIACompExtractor returns the NTIA per-component extractor for the given feature key.

func LookupNTIADocExtractor added in v2.0.6

func LookupNTIADocExtractor(feature string) (extractors.DocExtractor, bool)

LookupNTIADocExtractor returns the NTIA document-level extractor for the given feature key.

Types

type ComponentResult

type ComponentResult struct {
	Name    string
	Version string
	Values  string
}

type DocumentResult

type DocumentResult struct {
	Key     string // e.g., "Authors", "Creation Timestamp"
	Value   string // e.g., "John Doe", "2023-01-12T22:06:03Z"
	Present bool   // Indicates if the property is present
}

type OptionList

type OptionList func(r *Report)

func WithColor

func WithColor(c bool) OptionList

func WithFormat

func WithFormat(c string) OptionList

func WithValues

func WithValues(s bool) OptionList

type Params

type Params struct {
	Path []string

	// input control
	Features []string
	Profile  string // compliance profile for feature extraction, e.g. "bsiv21"

	// output control
	JSON     bool
	Basic    bool
	Detailed bool
	Color    bool
	Show     bool

	Missing bool

	Debug bool
}

type Report

type Report struct {
	Ctx     context.Context
	Results []*Result
	Format  string
	Color   bool
	Show    bool // show values for corresponding features
}

listReport holds the state for reporting the list command results

func NewListReport

func NewListReport(ctx context.Context, results []*Result, opts ...OptionList) *Report

func (*Report) Report

func (r *Report) Report()

Report renders the list command results in the specified format

type Result

type Result struct {
	FilePath           string
	Feature            string
	Missing            bool
	IsComponentFeature bool // true when evaluated per-component; false for SBOM-level
	TotalComponents    int
	Components         []ComponentResult // For component-based features
	DocumentProperty   DocumentResult    // For SBOM-based features
	Errors             []string
}

func ComponentsListResult

func ComponentsListResult(ctx context.Context, ep *Params) (*Result, error)

ComponentsListResult lists components or SBOM properties based on the specified features for multiple local SBOMs

Directories

Path Synopsis
Package extractors provides profile-aware field extractors for the list command.
Package extractors provides profile-aware field extractors for the list command.

Jump to

Keyboard shortcuts

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