annotator

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package annotator provides the interface for annotation plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, config *Config, inventory *inventory.Inventory) ([]*plugin.Status, error)

Run runs the specified annotators on the scan results and returns their statuses.

Types

type Annotator

type Annotator interface {
	plugin.Plugin
	// Annotate annotates the scan results with additional information.
	Annotate(ctx context.Context, input *ScanInput, results *inventory.Inventory) error
}

Annotator is the interface for an annotation plugin, used to add additional information to scan results such as VEX statements. Annotators have access to the filesystem but should ideally not query any external APIs. If you need to modify the scan results based on the output of network calls you should use the Enricher interface instead.

type Config

type Config struct {
	Annotators []Annotator
	ScanRoot   *scalibrfs.ScanRoot
}

Config stores the config settings for the annotation run.

type ScanInput

type ScanInput struct {
	// The root of the artifact being scanned.
	ScanRoot *scalibrfs.ScanRoot
}

ScanInput provides information for the annotator about the scan.

Directories

Path Synopsis
Package cachedir implements an annotator for packages that are in cache directories.
Package cachedir implements an annotator for packages that are in cache directories.
ffa
unknownbinariesanno
Package unknownbinariesanno removes all packages extracted by unknown binaries filters out the known binaries, and records the remaining as a finding.
Package unknownbinariesanno removes all packages extracted by unknown binaries filters out the known binaries, and records the remaining as a finding.
unknownbinariesanno/internal/apkfilter
Package apkfilter filters out binaries that are part of an apk package.
Package apkfilter filters out binaries that are part of an apk package.
unknownbinariesanno/internal/dpkgfilter
Package dpkgfilter filters out binaries that are part of a dpkg package
Package dpkgfilter filters out binaries that are part of a dpkg package
unknownbinariesanno/internal/filter
Package filter defines the interface to implement a unknown binary filter.
Package filter defines the interface to implement a unknown binary filter.
Package list provides a list of annotation plugins.
Package list provides a list of annotation plugins.
misc
dpkgsource
Package dpkgsource provides a way to annotate packages with repository source information.
Package dpkgsource provides a way to annotate packages with repository source information.
npmsource
Package npmsource implements an annotator for packages to determine where they were installed from.
Package npmsource implements an annotator for packages to determine where they were installed from.
noexecutable
dpkg
Package dpkg implements an annotator for DPKG packages that don't contain any executables.
Package dpkg implements an annotator for DPKG packages that don't contain any executables.
Package osduplicate implements utility functions for identifying inventory duplicates found in OS packages.
Package osduplicate implements utility functions for identifying inventory duplicates found in OS packages.
apk
Package apk implements an annotator for language packages that have already been found in APK OS packages.
Package apk implements an annotator for language packages that have already been found in APK OS packages.
cos
Package cos implements an annotator for language packages that have already been found in COS OS packages.
Package cos implements an annotator for language packages that have already been found in COS OS packages.
dpkg
Package dpkg implements an annotator for language packages that have already been found in DPKG OS packages.
Package dpkg implements an annotator for language packages that have already been found in DPKG OS packages.
rpm
Package rpm implements an annotator for language packages that have already been found in RPM OS packages.
Package rpm implements an annotator for language packages that have already been found in RPM OS packages.

Jump to

Keyboard shortcuts

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