Documentation ¶
Overview ¶
Package cataloger provides the ability to process files from a container image or file system and discover packages (gems, wheels, jars, rpms, debs, etc). Specifically, this package contains both a catalog function to utilize all catalogers defined in child packages as well as the interface definition to implement a cataloger.
Index ¶
- Constants
- func AllCatalogers(cfg Config) []pkg.Cataloger
- func Catalog(resolver file.Resolver, _ *linux.Release, parallelism int, ...) (*pkg.Collection, []artifact.Relationship, error)
- func DirectoryCatalogers(cfg Config) []pkg.Cataloger
- func ExcludeBinaryByFileOwnershipOverlap(r artifact.Relationship, c *pkg.Collection) bool
- func ImageCatalogers(cfg Config) []pkg.Cataloger
- func RequestedAllCatalogers(cfg Config) bool
- type Config
- type Monitor
- type SearchConfig
Constants ¶
const AllCatalogersPattern = "all"
Variables ¶
This section is empty.
Functions ¶
func AllCatalogers ¶ added in v0.30.0
AllCatalogers returns all implemented catalogers
func Catalog ¶
func Catalog(resolver file.Resolver, _ *linux.Release, parallelism int, catalogers ...pkg.Cataloger) (*pkg.Collection, []artifact.Relationship, error)
Catalog a given source (container image or filesystem) with the given catalogers, returning all discovered packages. In order to efficiently retrieve contents from a underlying container image the content fetch requests are done in bulk. Specifically, all files of interest are collected from each catalogers and accumulated into a single request.
func DirectoryCatalogers ¶
DirectoryCatalogers returns a slice of locally implemented catalogers that are fit for detecting packages from index files (and select installations)
func ExcludeBinaryByFileOwnershipOverlap ¶ added in v0.87.0
func ExcludeBinaryByFileOwnershipOverlap(r artifact.Relationship, c *pkg.Collection) bool
ExcludeBinaryByFileOwnershipOverlap will remove packages from a collection given the following properties are true 1) the relationship between packages is OwnershipByFileOverlap 2) the parent is an "os" package 3) the child is a synthetic package generated by the binary cataloger 4) the package names are identical This was implemented as a way to help resolve: https://github.com/anchore/syft/issues/931
func ImageCatalogers ¶
ImageCatalogers returns a slice of locally implemented catalogers that are fit for detecting installations of packages.
func RequestedAllCatalogers ¶ added in v0.50.0
Types ¶
type Config ¶ added in v0.35.0
type Config struct { Search SearchConfig Golang golang.GoCatalogerOpts LinuxKernel kernel.LinuxCatalogerConfig Python python.CatalogerConfig Java java.CatalogerOpts Catalogers []string Parallelism int ExcludeBinaryOverlapByOwnership bool }
TODO: these field naming vs helper function naming schemes are inconsistent.
func DefaultConfig ¶ added in v0.35.0
func DefaultConfig() Config
func (Config) JavaConfig ¶ added in v0.95.0
JavaConfig merges relevant config values from Config to return a java.Config struct. Values like IncludeUnindexedArchives and IncludeIndexedArchives are used across catalogers and are not specific to Java requiring this merge.
type Monitor ¶
type Monitor struct { FilesProcessed progress.Monitorable // the number of files selected and contents analyzed from all registered catalogers PackagesDiscovered progress.Monitorable // the number of packages discovered from all registered catalogers }
Monitor provides progress-related data for observing the progress of a Catalog() call (published on the event bus).
type SearchConfig ¶ added in v0.35.0
type SearchConfig struct { IncludeIndexedArchives bool IncludeUnindexedArchives bool Scope source.Scope }
func DefaultSearchConfig ¶ added in v0.35.0
func DefaultSearchConfig() SearchConfig
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package alpine provides a concrete Cataloger implementations for packages relating to the Alpine linux distribution.
|
Package alpine provides a concrete Cataloger implementations for packages relating to the Alpine linux distribution. |
Package arch provides a concrete Cataloger implementations for packages relating to the Arch linux distribution.
|
Package arch provides a concrete Cataloger implementations for packages relating to the Arch linux distribution. |
Package binary provides a concrete Cataloger implementations for surfacing possible packages based on signatures found within binary files.
|
Package binary provides a concrete Cataloger implementations for surfacing possible packages based on signatures found within binary files. |
common
|
|
cpe/dictionary/index-generator
This program downloads the latest CPE dictionary from NIST and processes it into a JSON file that can be embedded into Syft for more accurate CPE results.
|
This program downloads the latest CPE dictionary from NIST and processes it into a JSON file that can be embedded into Syft for more accurate CPE results. |
Package cpp provides a concrete Cataloger implementations for the C/C++ language ecosystem.
|
Package cpp provides a concrete Cataloger implementations for the C/C++ language ecosystem. |
Package dart provides a concrete Cataloger implementations for the Dart language ecosystem.
|
Package dart provides a concrete Cataloger implementations for the Dart language ecosystem. |
Package debian provides a concrete Cataloger implementation relating to packages within the Debian linux distribution.
|
Package debian provides a concrete Cataloger implementation relating to packages within the Debian linux distribution. |
Package dotnet provides a concrete Cataloger implementation relating to packages within the C#/.NET language/runtime ecosystem.
|
Package dotnet provides a concrete Cataloger implementation relating to packages within the C#/.NET language/runtime ecosystem. |
Package elixir provides a concrete Cataloger implementation relating to packages within the Elixir language ecosystem.
|
Package elixir provides a concrete Cataloger implementation relating to packages within the Elixir language ecosystem. |
Package erlang provides a concrete Cataloger implementation relating to packages within the Erlang language ecosystem.
|
Package erlang provides a concrete Cataloger implementation relating to packages within the Erlang language ecosystem. |
Package gentoo provides a concrete Cataloger implementation related to packages within the Gentoo linux ecosystem.
|
Package gentoo provides a concrete Cataloger implementation related to packages within the Gentoo linux ecosystem. |
Package githubactions provides a concrete Cataloger implementation for GitHub Actions packages (both actions and workflows).
|
Package githubactions provides a concrete Cataloger implementation for GitHub Actions packages (both actions and workflows). |
Package golang provides a concrete Cataloger implementation relating to packages within the Go language ecosystem.
|
Package golang provides a concrete Cataloger implementation relating to packages within the Go language ecosystem. |
Package haskell provides a concrete Cataloger implementation relating to packages within the Haskell language ecosystem.
|
Package haskell provides a concrete Cataloger implementation relating to packages within the Haskell language ecosystem. |
internal
|
|
Package java provides a concrete Cataloger implementation for packages relating to the Java language ecosystem.
|
Package java provides a concrete Cataloger implementation for packages relating to the Java language ecosystem. |
Package javascript provides a concrete Cataloger implementation for packages relating to the JavaScript language ecosystem.
|
Package javascript provides a concrete Cataloger implementation for packages relating to the JavaScript language ecosystem. |
Package kernel provides a concrete Cataloger implementation for linux kernel and module files.
|
Package kernel provides a concrete Cataloger implementation for linux kernel and module files. |
Package nix provides a concrete Cataloger implementation for packages within the Nix packaging ecosystem.
|
Package nix provides a concrete Cataloger implementation for packages within the Nix packaging ecosystem. |
Package php provides a concrete Cataloger implementation relating to packages within the PHP language ecosystem.
|
Package php provides a concrete Cataloger implementation relating to packages within the PHP language ecosystem. |
Package python provides a concrete Cataloger implementation relating to packages within the Python language ecosystem.
|
Package python provides a concrete Cataloger implementation relating to packages within the Python language ecosystem. |
Package r provides a concrete Cataloger implementation relating to packages within the R language ecosystem.
|
Package r provides a concrete Cataloger implementation relating to packages within the R language ecosystem. |
Package redhat provides a concrete DBCataloger implementation relating to packages within the RedHat linux distribution.
|
Package redhat provides a concrete DBCataloger implementation relating to packages within the RedHat linux distribution. |
Package ruby provides a concrete Cataloger implementation relating to packages within the Ruby language ecosystem.
|
Package ruby provides a concrete Cataloger implementation relating to packages within the Ruby language ecosystem. |
Package rust provides a concrete Cataloger implementation relating to packages within the Rust language ecosystem.
|
Package rust provides a concrete Cataloger implementation relating to packages within the Rust language ecosystem. |
Package sbom provides a concrete Cataloger implementation for capturing packages embedded within SBOM files.
|
Package sbom provides a concrete Cataloger implementation for capturing packages embedded within SBOM files. |
Package swift provides a concrete Cataloger implementation relating to packages within the swift language ecosystem.
|
Package swift provides a concrete Cataloger implementation relating to packages within the swift language ecosystem. |