check

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VerdictClean       = "clean"
	VerdictMalicious   = "malicious"
	VerdictQuarantined = "quarantined"
	VerdictSuspicious  = "suspicious"
	VerdictUnknown     = "unknown"
	VerdictNotFound    = "not_found"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvisoryReference

type AdvisoryReference struct {
	Type string `json:"type,omitempty"`
	URL  string `json:"url"`
}

type AdvisorySummary

type AdvisorySummary struct {
	ID          string              `json:"id"`
	URL         string              `json:"url"`
	Summary     string              `json:"summary,omitempty"`
	ModifiedAt  string              `json:"modified_at,omitempty"`
	PublishedAt string              `json:"published_at,omitempty"`
	References  []AdvisoryReference `json:"references,omitempty"`
}

type BareRef

type BareRef struct {
	Name    string
	Version string
}

type BatchResult

type BatchResult struct {
	Total   int      `json:"total"`
	Results []Result `json:"results"`
}

type Result

type Result struct {
	Ref               string            `json:"ref"`
	PURL              string            `json:"purl"`
	Verdict           string            `json:"verdict"`
	Confidence        string            `json:"confidence"`
	IDs               []string          `json:"ids"`
	PackageEcosystem  string            `json:"package_ecosystem,omitempty"`
	PackageName       string            `json:"package_name,omitempty"`
	PackageVersion    string            `json:"package_version,omitempty"`
	PackageURL        string            `json:"registry_url,omitempty"`
	CheckedEcosystems []string          `json:"checked_ecosystems,omitempty"`
	MatchedEcosystems []string          `json:"matched_ecosystems,omitempty"`
	FoundEcosystems   []string          `json:"found_ecosystems,omitempty"`
	Registry          *registry.Status  `json:"registry,omitempty"`
	Advisories        []AdvisorySummary `json:"advisories,omitempty"`
}

type Service

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

func NewService

func NewService(provider intel.Provider, reg *registry.Client, cacheDir string) *Service

func (*Service) Check

func (s *Service) Check(ctx context.Context, pkg ref.PackageRef) (*Result, error)

func (*Service) CheckAll

func (s *Service) CheckAll(ctx context.Context, name, version string) (*Result, error)

func (*Service) CheckAllMany

func (s *Service) CheckAllMany(ctx context.Context, items []BareRef) ([]Result, error)

Jump to

Keyboard shortcuts

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