securityscan

package
v0.0.0-...-58527a2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheKey

func CacheKey(subject domain.SecuritySubject, requirement domain.SecurityRequirement) string

func DefaultRequirement

func DefaultRequirement() domain.SecurityRequirement

Types

type Cache

type Cache interface {
	Load(string) (domain.SecurityAssessment, bool)
	Store(string, domain.SecurityAssessment) error
}

type CommandScanner

type CommandScanner struct {
	Executable string
	Timeout    time.Duration
}

func (CommandScanner) Scan

func (scanner CommandScanner) Scan(ctx context.Context, packageRoot string) ([]byte, error)

type Evaluator

type Evaluator struct {
	Scanner     Scanner
	Cache       Cache
	Requirement domain.SecurityRequirement
}

func (Evaluator) Evaluate

type FileCache

type FileCache struct {
	Root string
}

func (FileCache) Load

func (cache FileCache) Load(key string) (domain.SecurityAssessment, bool)

func (FileCache) Store

func (cache FileCache) Store(key string, assessment domain.SecurityAssessment) error

type ReleaseScanner

type ReleaseScanner struct {
	Root       string
	HTTPClient *http.Client
	Origin     string
	GOOS       string
	GOARCH     string
}

func (ReleaseScanner) Scan

func (scanner ReleaseScanner) Scan(ctx context.Context, packageRoot string) ([]byte, error)

type Scanner

type Scanner interface {
	Scan(context.Context, string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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