scan

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AdvisoriesSetResolved = "resolved"
	AdvisoriesSetAll      = "all"
)

Variables

Functions

This section is empty.

Types

type Finding

type Finding struct {
	Package       Package
	Vulnerability Vulnerability
}

Finding represents a vulnerability finding for a single package.

func FilterWithAdvisories added in v0.1.0

func FilterWithAdvisories(result *Result, advisoryCfgs *configs.Index[v2.Document], advisoryFilterSet string) ([]*Finding, error)

FilterWithAdvisories filters the findings in the result based on the advisories for the target APK.

type Package

type Package struct {
	ID       string
	Name     string
	Version  string
	Type     string
	Location string
}

type Result added in v0.1.0

type Result struct {
	TargetAPK TargetAPK
	Findings  []*Finding
}

func APKSBOM

func APKSBOM(r io.Reader, localDBFilePath string) (*Result, error)

APKSBOM scans an SBOM of an APK for vulnerabilities.

type TargetAPK added in v0.1.0

type TargetAPK struct {
	Name              string
	Version           string
	OriginPackageName string
}

func (TargetAPK) Origin added in v0.4.2

func (t TargetAPK) Origin() string

Origin returns the name of the origin package, if the package's metadata indicates an origin package. Otherwise, it returns the package name.

type Vulnerability

type Vulnerability struct {
	ID           string
	Severity     string
	Aliases      []string
	FixedVersion string
}

Jump to

Keyboard shortcuts

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