scanner

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: GPL-3.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeLibraries added in v0.15.12

func AnalyzeLibraries(ctx context.Context, libFilemap map[string]libFile, isOffline bool) (libraryScanners []models.LibraryScanner, err error)

AnalyzeLibraries : detects libs defined in lockfile

func EnsureResultDir

func EnsureResultDir(resultsDir string, scannedAt time.Time) (currentDir string, err error)

EnsureResultDir ensures the directory for scan results

func ParseInstalledPkgs added in v0.15.11

func ParseInstalledPkgs(distro config.Distro, kernel models.Kernel, pkgList string) (models.Packages, models.SrcPackages, error)

ParseInstalledPkgs parses installed pkgs line

func ViaHTTP

func ViaHTTP(header http.Header, body string, toLocalFile bool) (models.ScanResult, error)

ViaHTTP scans servers by HTTP header and body

Types

type DetectedCveID

type DetectedCveID struct {
	CveID      string
	Confidence models.Confidence
}

DetectedCveID has CveID, Confidence and DetectionMethod fields LenientMatching will be true if this vulnerability is not detected by accurate version matching. see https://github.com/future-architect/vuls/pull/328

type DummyFileInfo

type DummyFileInfo struct {
	// contains filtered or unexported fields
}

DummyFileInfo is a dummy struct for libscan

func (*DummyFileInfo) IsDir

func (d *DummyFileInfo) IsDir() bool

IsDir is

func (*DummyFileInfo) ModTime

func (d *DummyFileInfo) ModTime() time.Time

ModTime is

func (*DummyFileInfo) Mode

func (d *DummyFileInfo) Mode() os.FileMode

Mode is

func (*DummyFileInfo) Name

func (d *DummyFileInfo) Name() string

Name is

func (*DummyFileInfo) Size

func (d *DummyFileInfo) Size() int64

Size is

func (*DummyFileInfo) Sys

func (d *DummyFileInfo) Sys() interface{}

Sys is

type Scanner

type Scanner struct {
	ResultsDir     string
	TimeoutSec     int
	ScanTimeoutSec int
	CacheDBPath    string
	Debug          bool
	LogToFile      bool
	LogDir         string
	Quiet          bool
	DetectIPS      bool

	Targets map[string]config.ServerInfo
}

Scanner has functions for scan

func (Scanner) Configtest

func (s Scanner) Configtest() error

Configtest checks if the server is scannable.

func (Scanner) Scan

func (s Scanner) Scan() error

Scan execute scan

Jump to

Keyboard shortcuts

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