Documentation ¶
Overview ¶
Package cli defines the structures to store the CLI flags used by the scanner binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateFlags ¶
ValidateFlags validates the passed command line flags.
Types ¶
type Array ¶
type Array []string
Array is a type to be passed to flag.Var that supports arrays passed as repeated flags, e.g. ./scalibr -o binproto=out.bp -o spdx23-json=out.spdx.json
type Flags ¶
type Flags struct { Root string ResultFile string Output Array ExtractorsToRun string DetectorsToRun string FilesToExtract []string DirsToSkip string SkipDirRegex string GovulncheckDBPath string SPDXDocumentName string SPDXDocumentNamespace string SPDXCreators string Verbose bool ExplicitExtractors bool }
Flags contains a field for all the cli flags that can be set.
func (*Flags) GetSPDXConfig ¶
func (f *Flags) GetSPDXConfig() converter.SPDXConfig
GetSPDXConfig creates an SPDXConfig struct based on the CLI flags.
func (*Flags) GetScanConfig ¶
func (f *Flags) GetScanConfig() (*scalibr.ScanConfig, error)
GetScanConfig constructs a SCALIBR scan config from the provided CLI flags.
func (*Flags) WriteScanResults ¶
func (f *Flags) WriteScanResults(result *scalibr.ScanResult) error
WriteScanResults writes SCALIBR scan results to files specified by the CLI flags.
Click to show internal directories.
Click to hide internal directories.