walker

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// These variables are exported so that a tool importing Vul as a library can override these values.
	AppDirs    = []string{".git"}
	SystemDirs = []string{"proc", "sys", "dev"}
)

Functions

func AppendPermitDiskName

func AppendPermitDiskName(s ...string)

Types

type ErrorCallback

type ErrorCallback func(pathname string, err error) error

type FS

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

func NewFS

func NewFS(skipFiles, skipDirs []string, slow bool, errCallback ErrorCallback) FS

func (FS) Walk

func (w FS) Walk(root string, fn WalkFunc) error

Walk walks the file tree rooted at root, calling WalkFunc for each file or directory in the tree, including root, but a directory to be ignored will be skipped.

type LayerTar

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

func NewLayerTar

func NewLayerTar(skipFiles, skipDirs []string, slow bool) LayerTar

func (LayerTar) Walk

func (w LayerTar) Walk(layer io.Reader, analyzeFn WalkFunc) ([]string, []string, error)

type VM

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

func NewVM

func NewVM(skipFiles, skipDirs []string, slow bool) VM

func (*VM) Walk

func (w *VM) Walk(vreader *io.SectionReader, root string, fn WalkFunc) error

type WalkFunc

type WalkFunc func(filePath string, info os.FileInfo, opener analyzer.Opener) error

Jump to

Keyboard shortcuts

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