updater

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package updater updates the vulnerability database periodically using the registered vulnerability fetchers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Healthcheck

func Healthcheck() health.Status

Healthcheck returns the health of the updater service.

func RegisterFetcher

func RegisterFetcher(name string, f Fetcher)

RegisterFetcher makes a Fetcher available by the provided name. If Register is called twice with the same name or if driver is nil, it panics.

func Run

func Run(interval time.Duration, st *utils.Stopper)

Run updates the vulnerability database at regular intervals

func Update

func Update()

Update fetches all the vulnerabilities from the registered fetchers, upserts them into the database and then sends notifications.

Types

type Fetcher

type Fetcher interface {
	FetchUpdate() (FetcherResponse, error)
}

Fetcher represents anything that can fetch vulnerabilities.

type FetcherResponse

type FetcherResponse struct {
	FlagName        string
	FlagValue       string
	Notes           []string
	Vulnerabilities []FetcherVulnerability
}

FetcherResponse represents the sum of results of an update.

type FetcherVulnerability

type FetcherVulnerability struct {
	ID          string
	Link        string
	Description string
	Priority    types.Priority
	FixedIn     []*database.Package
}

FetcherVulnerability represents an individual vulnerability processed from an update.

Directories

Path Synopsis
Package fetchers implements vulnerability fetchers for several sources.
Package fetchers implements vulnerability fetchers for several sources.

Jump to

Keyboard shortcuts

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