Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatSince ¶
func IsMaliciousID ¶
func MaliciousVulns ¶
func MaliciousVulns(vulns []malindex.Vulnerability) []malindex.Vulnerability
Types ¶
type FeedRequest ¶
type FeedResponse ¶
type FeedResponse struct {
Entries []source.PackageEntry
WindowStats source.WindowStats
Total int
FromCache bool
}
type Provider ¶
type Provider interface {
Name() string
GetVuln(ctx context.Context, id string) (*malindex.Vulnerability, error)
Query(ctx context.Context, q malindex.QueryRequest) (*malindex.QueryResponse, error)
QueryBatch(ctx context.Context, queries []malindex.QueryRequest) (*malindex.BatchQueryResponse, error)
Feed(ctx context.Context, req FeedRequest) (*FeedResponse, error)
Search(ctx context.Context, req SearchRequest) (*SearchResponse, error)
LoadMaliciousIndex(ctx context.Context, onProgress malindex.IndexLoadProgress, onStatus malindex.IndexLoadStatus) (*malindex.MaliciousIndex, error)
VulnPageURL(id string) string
StartBackgroundSync(ctx context.Context)
// WaitBackgroundSync blocks until any in-flight background refresh finishes
// so it persists before the process exits. Bounded by the network timeout.
WaitBackgroundSync()
SyncStatus() sync.Status
}
Provider is the malicious-package intelligence backend. depx has a single source — the ProjectDiscovery inventory export — served entirely from a local compiled index after the first download.
type SearchRequest ¶
type SearchRequest struct {
Query string
Ecosystem string
Limit int
OnProgress malindex.IndexLoadProgress
OnStatus malindex.IndexLoadStatus
}
type SearchResponse ¶
type SearchResponse struct {
Entries []source.PackageEntry
Total int
}
Click to show internal directories.
Click to hide internal directories.