Versions in this module Expand all Collapse all v0 v0.44.0 Aug 25, 2023 v0.0.1 Oct 9, 2023 Changes in this version + var ErrNoPkgsDetected = xerrors.New("no packages detected") + var ErrPkgAnalysis = xerrors.New("failed to analyze packages") + var ErrUnknownOS = xerrors.New("unknown OS") + var TypeConfigFiles = []Type + var TypeIndividualPkgs = []Type + var TypeLanguages = []Type + var TypeLockfiles = []Type + var TypeOSes = []Type + func DeregisterAnalyzer(t Type) + func DeregisterConfigAnalyzer(t Type) + func RegisterAnalyzer(analyzer analyzer) + func RegisterConfigAnalyzer(t Type, init configAnalyzerConstructor) + func RegisterPostAnalyzer(t Type, initializer postAnalyzerInitialize) + type AnalysisInput struct + Content dio.ReadSeekerAt + Dir string + FilePath string + Info os.FileInfo + Options AnalysisOptions + type AnalysisOptions struct + FileChecksum bool + Offline bool + type AnalysisResult struct + Applications []types.Application + BuildInfo *types.BuildInfo + CustomResources []types.CustomResource + Digests map[string]string + Licenses []types.LicenseFile + Misconfigurations []types.Misconfiguration + OS types.OS + PackageInfos []types.PackageInfo + Repository *types.Repository + Secrets []types.Secret + SystemInstalledFiles []string + func NewAnalysisResult() *AnalysisResult + func (r *AnalysisResult) Merge(newResult *AnalysisResult) + func (r *AnalysisResult) Sort() + type AnalyzerGroup struct + func NewAnalyzerGroup(opt AnalyzerOptions) (AnalyzerGroup, error) + func (ag AnalyzerGroup) AnalyzeFile(ctx context.Context, wg *sync.WaitGroup, limit *semaphore.Weighted, ...) error + func (ag AnalyzerGroup) AnalyzerVersions() Versions + func (ag AnalyzerGroup) PostAnalyze(ctx context.Context, compositeFS *CompositeFS, result *AnalysisResult, ...) error + func (ag AnalyzerGroup) PostAnalyzerFS() (*CompositeFS, error) + func (ag AnalyzerGroup) RequiredPostAnalyzers(filePath string, info os.FileInfo) []Type + type AnalyzerOptions struct + DisabledAnalyzers []Type + FilePatterns []string + Group Group + LicenseScannerOption LicenseScannerOption + MisconfScannerOption misconf.ScannerOption + SecretScannerOption SecretScannerOption + Slow bool + type CompositeFS struct + func NewCompositeFS(group AnalyzerGroup) (*CompositeFS, error) + func (c *CompositeFS) Cleanup() error + func (c *CompositeFS) CopyFileToTemp(opener Opener, info os.FileInfo) (string, error) + func (c *CompositeFS) CreateLink(analyzerTypes []Type, rootDir, virtualPath, realPath string) error + func (c *CompositeFS) Get(t Type) (*mapfs.FS, bool) + func (c *CompositeFS) Set(t Type, mfs *mapfs.FS) + type ConfigAnalysisInput struct + Config *v1.ConfigFile + OS types.OS + type ConfigAnalysisResult struct + HistoryPackages types.Packages + Misconfiguration *types.Misconfiguration + Secret *types.Secret + func (r *ConfigAnalysisResult) Merge(newResult *ConfigAnalysisResult) + type ConfigAnalyzer interface + Analyze func(ctx context.Context, input ConfigAnalysisInput) (*ConfigAnalysisResult, error) + Required func(osFound types.OS) bool + Type func() Type + Version func() int + type ConfigAnalyzerGroup struct + func NewConfigAnalyzerGroup(opts ConfigAnalyzerOptions) (ConfigAnalyzerGroup, error) + func (ag *ConfigAnalyzerGroup) AnalyzeImageConfig(ctx context.Context, targetOS types.OS, config *v1.ConfigFile) *ConfigAnalysisResult + func (ag *ConfigAnalyzerGroup) AnalyzerVersions() Versions + type ConfigAnalyzerOptions struct + DisabledAnalyzers []Type + FilePatterns []string + MisconfScannerOption misconf.ScannerOption + SecretScannerOption SecretScannerOption + type CustomGroup interface + Group func() Group + type Group string + const GroupBuiltin + type Initializer interface + Init func(AnalyzerOptions) error + type LicenseScannerOption struct + ClassifierConfidenceLevel float64 + Full bool + type Opener func() (dio.ReadSeekCloserAt, error) + type PostAnalysisInput struct + FS fs.FS + Options AnalysisOptions + type PostAnalyzer interface + PostAnalyze func(ctx context.Context, input PostAnalysisInput) (*AnalysisResult, error) + Required func(filePath string, info os.FileInfo) bool + Type func() Type + Version func() int + type SecretScannerOption struct + ConfigPath string + type Type string + const TypeAlma + const TypeAlpine + const TypeAmazon + const TypeApk + const TypeApkCommand + const TypeApkRepo + const TypeAzureARM + const TypeBundler + const TypeCBLMariner + const TypeCargo + const TypeCentOS + const TypeCloudFormation + const TypeCocoaPods + const TypeComposer + const TypeConanLock + const TypeCondaPkg + const TypeDebian + const TypeDockerfile + const TypeDotNetCore + const TypeDpkg + const TypeDpkgLicense + const TypeExecutable + const TypeFedora + const TypeGemSpec + const TypeGoBinary + const TypeGoMod + const TypeGradleLock + const TypeHelm + const TypeHistoryDockerfile + const TypeImageConfigSecret + const TypeJar + const TypeKubernetes + const TypeLicenseFile + const TypeMixLock + const TypeNodePkg + const TypeNpmPkgLock + const TypeNuget + const TypeOSRelease + const TypeOracle + const TypePhoton + const TypePip + const TypePipenv + const TypePnpm + const TypePoetry + const TypePom + const TypePubSpecLock + const TypePythonPkg + const TypeRedHatBase + const TypeRedHatContentManifestType + const TypeRedHatDockerfileType + const TypeRocky + const TypeRpm + const TypeRpmqa + const TypeRustBinary + const TypeSBOM + const TypeSUSE + const TypeSecret + const TypeSwift + const TypeTerraform + const TypeTerraformPlan + const TypeUbuntu + const TypeUbuntuESM + const TypeYarn + type Versions struct + Analyzers map[string]int + PostAnalyzers map[string]int