dpkg

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Overview

Package dpkg implements a package scanner for dpkg packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEcosystem

func NewEcosystem(ctx context.Context) *scanner.Ecosystem

NewEcosystem provides the set of scanners and coalescers for the dpkg ecosystem

Types

type Coalescer

type Coalescer struct {
	// contains filtered or unexported fields
}

Coalescer takes individual layer artifacts and coalesces them to form the final image's package results

It is expected to run a coalescer per "ecosystem". For example it would make sense to coalesce results for dpkg, os-release, and apt scanners

func NewCoalescer

func NewCoalescer(store scanner.Store) *Coalescer

NewCoalescer is a constructor for a Coalescer

func (*Coalescer) Coalesce

func (c *Coalescer) Coalesce(ctx context.Context, layers []*claircore.Layer) (*claircore.ScanReport, error)

Coalesce coalesces artifacts found in layers and creates a final ScanReport with the final package details found in the image. This method blocks and when its finished the c.sr field will hold the final ScanReport

type Scanner

type Scanner struct{}

Scanner implements the scanner.PackageScanner interface.

This looks for directories that look like dpkg databases and examines the "status" file it finds there.

The zero value is ready to use.

func (*Scanner) Kind

func (ps *Scanner) Kind() string

Kind implements scanner.VersionedScanner.

func (*Scanner) Name

func (ps *Scanner) Name() string

Name implements scanner.VersionedScanner.

func (*Scanner) Scan

func (ps *Scanner) Scan(layer *claircore.Layer) ([]*claircore.Package, error)

Scan proxies the call to ScanContext.

func (*Scanner) ScanContext

func (ps *Scanner) ScanContext(ctx context.Context, layer *claircore.Layer) ([]*claircore.Package, error)

ScanContext attempts to find a dpkg database within the layer and read all of the installed packages it can find in the "status" file.

It's expected to return (nil, nil) if there's no dpkg database in the layer.

It does not respect any dpkg configuration files.

func (*Scanner) Version

func (ps *Scanner) Version() string

Version implements scanner.VersionedScanner.

Jump to

Keyboard shortcuts

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