action

package
v1.19.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CHANGE = iota + 1
	OBJECTIVE
	RESOURCE
	TECHNIQUE
	ALL
)

Sensitivity levels: 1: Only display a diff if the file's risk score changes (equivalent to FileRiskChange) 2: Only display a diff if the file's objective changes (e.g., anti-static -> c2) 3: Only display a diff if the file's resource changes (e.g., base64 -> binary) 4: Only display a diff if the file's technique changes (e.g., eval -> exec) 5: Display all files in a diff (default, no filtering)

Variables

View Source
var (
	ErrMatchedCondition = errors.New("matched exit criteria")
)

Functions

func CachedRules added in v1.5.0

func CachedRules(ctx context.Context, fss []fs.FS) (*yarax.Rules, error)

func CleanPath added in v1.18.0

func CleanPath(path string, prefix string) string

CleanPath removes the temporary directory prefix from the path.

func Scan

Scan YARA scans a data source, applying output filters if necessary.

Types

type ErrorType added in v1.8.5

type ErrorType int
const (
	// TypeUnknown will be the default of `0`.
	TypeUnknown ErrorType = iota
	// TypeScanError is to be used when compiled rules are invalid or the scan fails otherwise.
	TypeScanError
	// TypeGenerateError is to be used when a file's report cannot be created.
	TypeGenerateError
)

Error type iotas.

type FileReportError added in v1.8.5

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

FileReportError is a custom error type to hold the error, path, and vanity reason.

func NewFileReportError added in v1.8.5

func NewFileReportError(err error, path string, reason ErrorType) *FileReportError

NewFileReportError returns a new FileReportError.

func (*FileReportError) Error added in v1.8.5

func (e *FileReportError) Error() string

func (*FileReportError) Is added in v1.8.5

func (e *FileReportError) Is(target error) bool

func (*FileReportError) Path added in v1.8.5

func (e *FileReportError) Path() string

func (*FileReportError) Type added in v1.8.5

func (e *FileReportError) Type() ErrorType

func (*FileReportError) Unwrap added in v1.8.5

func (e *FileReportError) Unwrap() error

type ProcessInfo added in v1.2.0

type ProcessInfo struct {
	PID            int32
	PPID           int32
	Name           string
	ScanPath       string
	AdvertisedPath string
	CmdLine        []string
}

func ActiveProcesses added in v1.2.0

func ActiveProcesses(ctx context.Context) ([]*ProcessInfo, error)

ActiveProcesses is an exported function that a list of active processes.

type ScanResult added in v1.10.0

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

Jump to

Keyboard shortcuts

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