testminion

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package testminion contains a minion only to be used for testing. Depending on how it's set up, it will always return a vulnerability or will never do so.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Minion

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

Minion that always returns a vuln, or never does so based on the internal wantsVuln flag.

func NewMinion

func NewMinion(paths []string, wantsVuln bool) *Minion

NewMinion creates a default test minion that returns a vuln or nothing based on the wantsVuln parameter, and announces Interests based on a set of paths.

func (Minion) AnalyzeFiles

func (m Minion) AnalyzeFiles(ctx context.Context, req *pb.AnalyzeFilesRequest) (*pb.AnalyzeFilesResponse, error)

AnalyzeFiles will return a vuln (or not) regardless of the files it's passed.

func (Minion) ListInitialInterests

ListInitialInterests returns a list of files which might contain package information for parsing.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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