db

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBCheck

func DBCheck()

Check if database file and metadata is exist from the local path, * when files are existing, it will check the latest version from the global metadata and it will compare from the local version to determine if needed to update.

func Fetch

func Fetch(packages *[]model.Package, vulnerabilities *[]model.Vulnerability)

Fetch all vulnerabilities in database based on the list of keywords from packages

func Filter

func Filter(vulnerabilities *[]model.Vulnerability, ignore *config.Vulnerability)

Check and locate and remove all of elements that matches the values based ignore policy in configuration

Types

type Metadata

type Metadata struct {
	Version       string `bson:"version" json:"version"`
	SchemaVersion string `bson:"schema_version" json:"schema_version"`
	Checksum      string `bson:"checksum" json:"checksum"`
	BuildDate     string `bson:"build_date" json:"build_date"`
	URL           string `bson:"url" json:"url"`
}

func GetLocalMetadata

func GetLocalMetadata() Metadata

Get local metadata to be use on file integrity checking and version checking from the global metadata.

Jump to

Keyboard shortcuts

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