syft

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: Apache-2.0 Imports: 9 Imported by: 56

Documentation

Overview

A "one-stop-shop" for helper utilities for all major functionality provided by child packages of the syft library.

Here is what the main execution path for syft does:

  1. Parse a user image string to get a stereoscope image.Source object
  2. Invoke all catalogers to catalog the image, adding discovered packages to a single catalog object
  3. Invoke a single presenter to show the contents of the catalog

A Scope object encapsulates the image object to be cataloged and the user options (catalog all layers vs. squashed layer), providing a way to inspect paths and file content within the image. The Scope object, not the image object, is used throughout the main execution path. This abstraction allows for decoupling of what is cataloged (a docker image, an OCI image, a filesystem, etc) and how it is cataloged (the individual catalogers).

Similar to the cataloging process, Linux distribution identification is also performed based on what is discovered within the image.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Catalog

func Catalog(userInput string, scoptOpt scope.Option) (*pkg.Catalog, *scope.Scope, *distro.Distro, error)

Catalog the given image from a particular perspective (e.g. squashed scope, all-layers scope). Returns the discovered set of packages, the identified Linux distribution, and the scope object used to wrap the data source.

func CatalogFromScope

func CatalogFromScope(s scope.Scope) (*pkg.Catalog, error)

Catalog the given scope, which may represent a container image or filesystem. Returns the discovered set of packages.

func IdentifyDistro

func IdentifyDistro(s scope.Scope) distro.Distro

IdentifyDistro attempts to discover what the underlying Linux distribution may be from the available flat files provided by the given scope object. If results are inconclusive a "UnknownDistro" Type is returned.

func SetBus

func SetBus(b *partybus.Bus)

SetBus sets the event bus for all syft library bus publish events onto (in-library subscriptions are not allowed).

func SetLogger

func SetLogger(logger logger.Logger)

SetLogger sets the logger object used for all syft logging calls.

Types

This section is empty.

Directories

Path Synopsis
Package cataloger provides the ability to process files from a container image or file system and discover packages (gems, wheels, jars, rpms, debs, etc).
Package cataloger provides the ability to process files from a container image or file system and discover packages (gems, wheels, jars, rpms, debs, etc).
apkdb
Package apkdb provides a concrete Cataloger implementation for Alpine DB files.
Package apkdb provides a concrete Cataloger implementation for Alpine DB files.
common
Package common provides generic utilities used by multiple catalogers.
Package common provides generic utilities used by multiple catalogers.
deb
Package dpkg provides a concrete Cataloger implementation for Debian package DB status files.
Package dpkg provides a concrete Cataloger implementation for Debian package DB status files.
golang
Package golang provides a concrete Cataloger implementation for go.mod files.
Package golang provides a concrete Cataloger implementation for go.mod files.
java
Package java provides a concrete Cataloger implementation for Java archives (jar, war, ear, jpi, hpi formats).
Package java provides a concrete Cataloger implementation for Java archives (jar, war, ear, jpi, hpi formats).
javascript
Package javascript provides a concrete Cataloger implementation for JavaScript ecosystem files (yarn and npm).
Package javascript provides a concrete Cataloger implementation for JavaScript ecosystem files (yarn and npm).
python
Package python provides a concrete Cataloger implementation for Python ecosystem files (egg, wheel, requirements.txt).
Package python provides a concrete Cataloger implementation for Python ecosystem files (egg, wheel, requirements.txt).
rpmdb
Package rpmdb provides a concrete Cataloger implementation for RPM "Package" DB files.
Package rpmdb provides a concrete Cataloger implementation for RPM "Package" DB files.
ruby
Package bundler provides a concrete Cataloger implementation for Ruby Gemfile.lock bundler files.
Package bundler provides a concrete Cataloger implementation for Ruby Gemfile.lock bundler files.
Package event provides event types for all events that the syft library published onto the event bus.
Package event provides event types for all events that the syft library published onto the event bus.
parsers
Package parsers provides parser helpers to extract payloads for each event type that the syft library publishes onto the event bus.
Package parsers provides parser helpers to extract payloads for each event type that the syft library publishes onto the event bus.
Defines the logging interface which is used throughout the syft library.
Defines the logging interface which is used throughout the syft library.
Package pkg provides the data structures for a package, a package catalog, package types, and domain-specific metadata.
Package pkg provides the data structures for a package, a package catalog, package types, and domain-specific metadata.
Defines a Presenter interface for displaying catalog results to an io.Writer as well as a helper utility to obtain a specific Presenter implementation given user configuration.
Defines a Presenter interface for displaying catalog results to an io.Writer as well as a helper utility to obtain a specific Presenter implementation given user configuration.
cyclonedx
Package cyclonedx is responsible for generating a CycloneDX XML report for the given container image or file system.
Package cyclonedx is responsible for generating a CycloneDX XML report for the given container image or file system.
Package scope provides an abstraction to allow a user to loosely define a data source to catalog and expose a common interface that catalogers and use explore and analyze data from the data source.
Package scope provides an abstraction to allow a user to loosely define a data source to catalog and expose a common interface that catalogers and use explore and analyze data from the data source.
resolvers
Package resolvers provides concrete implementations for the scope.Resolver interface for all supported data sources and scope options.
Package resolvers provides concrete implementations for the scope.Resolver interface for all supported data sources and scope options.

Jump to

Keyboard shortcuts

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