Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgeSignal ¶
type AgeSignal struct {
// contains filtered or unexported fields
}
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine runs each registered Signal against a package and collects the reports.
Signals are expected to handle their own "couldn't determine" cases by returning SignalSkip with nil error. The engine-level error branch below is for unexpected failures the signal didn't catch (panics recovered to error, internal bugs). Those are surfaced as SignalError so the policy layer can decide fail-open vs fail-closed via the strict_signals knob.
type OSVSignal ¶
type OSVSignal struct {
// contains filtered or unexported fields
}
func NewOSVSignal ¶
type Package ¶
type Package struct {
Ecosystem Ecosystem
Name string
Version string
PublishedAt time.Time
Author string // npm: first maintainer username; PyPI: author field
}
Package is everything the trust engine needs to assess a specific release.
type PopularitySignal ¶
type PopularitySignal struct {
// contains filtered or unexported fields
}
func NewPopularitySignal ¶
func (*PopularitySignal) Check ¶
func (s *PopularitySignal) Check(ctx context.Context, pkg Package) (SignalReport, error)
func (*PopularitySignal) Name ¶
func (s *PopularitySignal) Name() string
type PublisherSignal ¶
type PublisherSignal struct {
// contains filtered or unexported fields
}
func NewPublisherSignal ¶
func (*PublisherSignal) Check ¶
func (s *PublisherSignal) Check(ctx context.Context, pkg Package) (SignalReport, error)
func (*PublisherSignal) Name ¶
func (s *PublisherSignal) Name() string
type Signal ¶
type Signal interface {
Name() string
Check(ctx context.Context, pkg Package) (SignalReport, error)
}
Signal is the interface every trust check implements.
type SignalReport ¶
type SignalReport struct {
Signal string
Result SignalResult
Reason string
Vulns []Vuln // populated by the OSV signal when Result == SignalFail
}
type SignalResult ¶
type SignalResult string
const ( SignalPass SignalResult = "pass" SignalFail SignalResult = "fail" SignalWarn SignalResult = "warn" SignalSkip SignalResult = "skip" SignalError SignalResult = "error" // signal couldn't run (network/parse failure); policy decides fail-open vs fail-closed )
type TrustResult ¶
type TrustResult struct {
Package Package
Reports []SignalReport
}
TrustResult collects all signal reports for one package version.