Documentation
¶
Overview ¶
Package packages registers the `safedep package` domain. Today it hosts on-demand package scanning (`package scan`) backed by the control-plane PackageScanService. The domain noun is deliberately generic: a package is any external software component in a supported ecosystem (OSS libraries, IDE/editor extensions, and more), not only OSS libraries.
Index ¶
- func Register(root *cobra.Command, a *app.App)
- type FileEvidence
- type ListInput
- type ListResult
- type ProjectEvidence
- type Report
- type Scan
- type ScanGetter
- type ScanLister
- type ScanReportGetter
- type ScanSubmitter
- type Service
- func (s *Service) Get(ctx context.Context, scanID string) (*Scan, error)
- func (s *Service) GetReport(ctx context.Context, scanID string) (*Report, error)
- func (s *Service) List(ctx context.Context, in ListInput) (*ListResult, error)
- func (s *Service) Submit(ctx context.Context, in SubmitInput) (*SubmitResult, error)
- type SubmitInput
- type SubmitResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileEvidence ¶
type ListInput ¶
type ListInput struct {
// Target filters the listing to one package version. Nil means no filter.
Target *packagev1.PackageVersion
PageSize uint32
PageToken string
}
type ListResult ¶
type ProjectEvidence ¶
type Report ¶
type Report struct {
Scan
ReportID string
AnalyzedAt time.Time
Summary string
Details string
IsMalware bool
FileEvidences []FileEvidence
ProjectEvidences []ProjectEvidence
Warnings []string
}
Report is the full analysis of a completed scan. It embeds the headline so renderers get identity and verdict alongside the evidence.
type Scan ¶
type Scan struct {
ScanID string
Ecosystem string
Name string
Version string
Status string
Verdict string
Confidence float64
Failure string
CreatedAt time.Time
CompletedAt time.Time
}
Scan is the headline record shared by get, list and the run result. It carries no report; verdict is empty until the scan is completed.
type ScanGetter ¶
type ScanLister ¶
type ScanLister interface {
List(ctx context.Context, in ListInput) (*ListResult, error)
}
type ScanReportGetter ¶
type ScanSubmitter ¶
type ScanSubmitter interface {
Submit(ctx context.Context, in SubmitInput) (*SubmitResult, error)
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(conn *grpc.ClientConn) *Service
func (*Service) Submit ¶
func (s *Service) Submit(ctx context.Context, in SubmitInput) (*SubmitResult, error)
type SubmitInput ¶
type SubmitInput struct {
Target *packagev1.PackageVersion
IdempotencyKey string
}
type SubmitResult ¶
Click to show internal directories.
Click to hide internal directories.