python

package
v1.5.16 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Overview

Package python contains components for interrogating python packages in container layers.

Package python contains components for interrogating python packages in container layers.

Index

Constants

This section is empty.

Variables

View Source
var (
	Repository = claircore.Repository{
		Name: "pypi",
		URI:  "https://pypi.org/simple",
	}
)

Functions

func NewCoalescer

func NewCoalescer(_ context.Context) (indexer.Coalescer, error)

func NewEcosystem

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

NewEcosystem provides the set of scanners for the python ecosystem.

Types

type Matcher

type Matcher struct{}

Matcher attempts to correlate discovered python packages with reported vulnerabilities.

func (*Matcher) Filter

func (*Matcher) Filter(record *claircore.IndexRecord) bool

Filter implements driver.Matcher.

func (*Matcher) Name

func (*Matcher) Name() string

Name implements driver.Matcher.

func (*Matcher) Query

func (*Matcher) Query() []driver.MatchConstraint

Query implements driver.Matcher.

func (*Matcher) Vulnerable

func (*Matcher) Vulnerable(ctx context.Context, record *claircore.IndexRecord, vuln *claircore.Vulnerability) (bool, error)

Vulnerable implements driver.Matcher.

type RepoScanner added in v0.0.24

type RepoScanner struct{}

func (*RepoScanner) Kind added in v0.0.24

func (*RepoScanner) Kind() string

Kind implements scanner.VersionedScanner.

func (*RepoScanner) Name added in v0.0.24

func (*RepoScanner) Name() string

Name implements scanner.VersionedScanner.

func (*RepoScanner) Scan added in v0.0.24

func (rs *RepoScanner) Scan(ctx context.Context, layer *claircore.Layer) ([]*claircore.Repository, error)

Scan attempts to find wheel or egg info directories and record the package information there.

A return of (nil, nil) is expected if there's nothing found.

func (*RepoScanner) Version added in v0.0.24

func (*RepoScanner) Version() string

Version implements scanner.VersionedScanner.

type Scanner

type Scanner struct{}

Scanner implements the scanner.PackageScanner interface.

It looks for directories that seem like wheels or eggs, and looks at the metadata recorded there. This type attempts to follow the specs documented by the PyPA, with the newer PEPs being preferred.

The zero value is ready to use.

func (*Scanner) Kind

func (*Scanner) Kind() string

Kind implements scanner.VersionedScanner.

func (*Scanner) Name

func (*Scanner) Name() string

Name implements scanner.VersionedScanner.

func (*Scanner) Scan

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

Scan attempts to find wheel or egg info directories and record the package information there.

A return of (nil, nil) is expected if there's nothing found.

func (*Scanner) Version

func (*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