Documentation ¶
Index ¶
- Variables
- func CheckPackage(pkg *types.Package) bool
- func RegisterAnalyzer(analyzer analyzer)
- func RegisterConfigAnalyzer(analyzer configAnalyzer)
- type AnalysisResult
- type AnalysisTarget
- type Analyzer
- func (a Analyzer) AnalyzeFile(ctx context.Context, wg *sync.WaitGroup, limit *semaphore.Weighted, ...) error
- func (a Analyzer) AnalyzeImageConfig(targetOS types.OS, configBlob []byte) []types.Package
- func (a Analyzer) AnalyzerVersions() map[string]int
- func (a Analyzer) ImageConfigAnalyzerVersions() map[string]int
- type Opener
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnknownOS occurs when unknown OS is analyzed. ErrUnknownOS = xerrors.New("unknown OS") // ErrPkgAnalysis occurs when the analysis of packages is failed. ErrPkgAnalysis = xerrors.New("failed to analyze packages") // ErrNoPkgsDetected occurs when the required files for an OS package manager are not detected ErrNoPkgsDetected = xerrors.New("no packages detected") )
Functions ¶
func CheckPackage ¶
func RegisterAnalyzer ¶
func RegisterAnalyzer(analyzer analyzer)
func RegisterConfigAnalyzer ¶
func RegisterConfigAnalyzer(analyzer configAnalyzer)
Types ¶
type AnalysisResult ¶
type AnalysisResult struct { OS *types.OS PackageInfos []types.PackageInfo Applications []types.Application Configs []types.Config // contains filtered or unexported fields }
func (*AnalysisResult) Merge ¶
func (r *AnalysisResult) Merge(new *AnalysisResult)
func (*AnalysisResult) Sort ¶
func (r *AnalysisResult) Sort()
type AnalysisTarget ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
func NewAnalyzer ¶
func (Analyzer) AnalyzeFile ¶
func (Analyzer) AnalyzeImageConfig ¶
func (Analyzer) AnalyzerVersions ¶
AnalyzerVersions returns analyzer version identifier used for cache keys.
func (Analyzer) ImageConfigAnalyzerVersions ¶
ImageConfigAnalyzerVersions returns analyzer version identifier used for cache keys.
type Type ¶
type Type string
const ( // OS TypeAlpine Type = "alpine" TypeAmazon Type = "amazon" TypeDebian Type = "debian" TypePhoton Type = "photon" TypeCentOS Type = "centos" TypeFedora Type = "fedora" TypeOracle Type = "oracle" TypeRedHatBase Type = "redhat" TypeSUSE Type = "suse" TypeUbuntu Type = "ubuntu" // OS Package TypeApk Type = "apk" TypeDpkg Type = "dpkg" TypeRpm Type = "rpm" // Programming Language Package TypeBundler Type = "bundler" TypeCargo Type = "cargo" TypeComposer Type = "composer" TypeJar Type = "jar" TypeNpm Type = "npm" TypeNuget Type = "nuget" TypePipenv Type = "pipenv" TypePoetry Type = "poetry" TypeYarn Type = "yarn" TypeGoBinary Type = "gobinary" TypeGoMod Type = "gomod" // Image Config TypeApkCommand Type = "apk-command" // Structured Config TypeYaml Type = "yaml" TypeTOML Type = "toml" TypeJSON Type = "json" TypeDockerfile Type = "dockerfile" TypeHCL Type = "hcl" )
Click to show internal directories.
Click to hide internal directories.