Versions in this module Expand all Collapse all v0 v0.6.2 Oct 27, 2026 v0.6.1 Oct 24, 2026 v0.6.0 Oct 11, 2026 Changes in this version + const AdvisorySourceNVD + const AdvisorySourceOSV + const CategoryApps + const CategoryChocolatey + const CategoryDeb + const CategoryHomebrew + const CategoryNPM + const CategoryOS + const CategoryPrograms + const CategoryPython + const CategoryRPM + const ConfidenceConfirmed + const ConfidencePossible + const DefaultKEVURL + const DefaultMaxDownload + const DefaultNVDURL + const DefaultOSVURL + const DefaultSyncInterval + const EvidenceCategory + const MaxRowsPerCategory + const QueryPrefix + const SeverityCritical + const SeverityHigh + const SeverityLow + const SeverityMedium + const SeverityUnknown + const StateAll + const StateOpen + const StateResolved + var ErrBadFilter = errors.New("invalid filter") + var ErrTooLarge = errors.New("download exceeds the size limit") + var ErrUnassessable = errors.New("version cannot be assessed") + func AdvisoryKey(osvEcosystem string) string + func IsVulnQuery(name string) bool + func Migrate(db *gorm.DB) error + func OSKey(platform, version, major string) string + func PackageKey(ecosystem, name string) string + func ParseEcosystems(s string) []string + func Profile(id string) (posture.PostureProfile, bool) + func Profiles() []posture.PostureProfile + func RegisterMetrics(reg prometheus.Registerer, db *gorm.DB) + func RequestSync(db *gorm.DB, at time.Time) error + type Advisory struct + CVSSFrom string + CVSSScore float64 + CVSSVector string + Details string + ID string + KEV bool + Modified time.Time + Published time.Time + RefURLs string + Severity string + Source string + Summary string + func (Advisory) TableName() string + type AdvisoryDetail struct + Advisory Advisory + Aliases []string + Findings []Finding + References []string + type Affected struct + AdvisoryID string + Ecosystem string + ID uint + Package string + Ranges string + Versions string + func (Affected) TableName() string + type Alias struct + AdvisoryID string + Alias string + func (Alias) TableName() string + type CPEProduct struct + Product string + Vendor string + func (CPEProduct) TableName() string + type Config struct + Ecosystems []string + HTTPClient *http.Client + KEVURL string + MaxDownload int64 + NVDAPIKey string + NVDEnabled bool + NVDURL string + OSVURL string + Retention time.Duration + SyncInterval time.Duration + type CountRow struct + Name string + Total int64 + type Escalation struct + CreatedAt time.Time + FindingID uint + ID uint + PrevKEV bool + PrevSeverity string + func (Escalation) TableName() string + type Event struct + Fixed string + Introduced string + LastAffected string + Limit string + type FeedStatus struct + LastSyncAt *time.Time + LastSyncFailed bool + Loaded bool + Sources []SyncState + Stale bool + SyncRequestedAt *time.Time + type Finding struct + AdvisoryID string + Confidence string + Ecosystem string + EnvironmentID uint + EverKEV bool + FirstSeen time.Time + FixedVersion string + ID uint + InstalledVersion string + KEV bool + LastSeen time.Time + NodeUUID string + Package string + PeakSeverity string + ReopenedAt *time.Time + ResolvedAt *time.Time + Severity string + func (Finding) TableName() string + type FindingFilter struct + Advisory string + Confidence string + EnvironmentID uint + KEV bool + NodeUUID string + Package string + Page int + PageSize int + Severity string + State string + type Inventory struct + DB *gorm.DB + func NewInventory(db *gorm.DB) (*Inventory, error) + func (inv *Inventory) EscalationsAfter(ctx context.Context, afterID uint, limit int) ([]NewFinding, error) + func (inv *Inventory) FindingsAfter(ctx context.Context, afterID uint, limit int) ([]NewFinding, error) + func (inv *Inventory) Ingest(nodeUUID string, envID uint, results []types.LogResultData) + func (inv *Inventory) LatestEscalationID(ctx context.Context) (uint, error) + func (inv *Inventory) LatestFindingID(ctx context.Context) (uint, error) + type KEV struct + CVEID string + func (KEV) TableName() string + type Matcher struct + CPE bool + DB *gorm.DB + func (m *Matcher) MatchNode(nodeUUID string) error + type NVDSource struct + func (s *NVDSource) Sync(ctx context.Context) (SyncResult, error) + type NewFinding struct + AdvisoryID string + EnvironmentID uint + Escalated bool + FindingID uint + FixedVersion string + Hostname string + ID uint + InstalledVersion string + KEV bool + NodeUUID string + Package string + PrevKEV bool + PrevSeverity string + Severity string + type NodeReport struct + Findings []Finding + InventoryAt *time.Time + Loaded bool + MatchedAt *time.Time + NotAssessed int + Stale bool + type NodeSoftware struct + Arch string + Category string + EnvironmentID uint + ID uint + LastSeen time.Time + Name string + NodeUUID string + SourceName string + Vendor string + Version string + func (NodeSoftware) TableName() string + type NodeState struct + Assessed int + EnvironmentID uint + InventoryAt time.Time + MatchedAt *time.Time + NodeUUID string + NotAssessed int + OSMajor string + OSPlatform string + OSVersion string + func (NodeState) TableName() string + type OSVSource struct + func (s *OSVSource) Sync(ctx context.Context, dir string) (SyncResult, error) + type Range struct + Events []Event + Type string + type Reader struct + DB *gorm.DB + StaleAfter time.Duration + func NewReader(db *gorm.DB, syncInterval time.Duration) *Reader + func (r *Reader) Advisory(id string, envID uint) (AdvisoryDetail, error) + func (r *Reader) Feeds() (FeedStatus, error) + func (r *Reader) Findings(f FindingFilter) ([]Finding, int64, error) + func (r *Reader) HealthComponent(ctx context.Context) health.Component + func (r *Reader) Node(uuid string, envID uint) (NodeReport, error) + func (r *Reader) ScoreEvidence(nodeUUIDs []string) (map[string][]posture.NodePosture, error) + func (r *Reader) ScoringRules() []posture.ScoringRule + func (r *Reader) Summary(envID uint) (Summary, error) + type Summary struct + AffectedNodes int64 + BySeverity map[string]map[string]int64 + KEV int64 + KEVPossible int64 + Loaded bool + NotAssessed int64 + Possible int64 + Stale bool + TopAdvisories []CountRow + TopPackages []CountRow + type SyncResult struct + Skipped int + Written int + type SyncState struct + Cursor time.Time + LastError string + LastErrorAt *time.Time + LastSkipped int + LastSuccess *time.Time + LastWritten int + ResumeIndex int + ResumeStart *time.Time + Source string + func (SyncState) TableName() string + type Worker struct + func NewWorker(db *gorm.DB, cfg Config) (*Worker, error) + func (w *Worker) Run(ctx context.Context) + func (w *Worker) Tick(ctx context.Context) error + type WorkerState struct + LastHousekeepAt *time.Time + LastSyncAt *time.Time + LastSyncFailed bool + LeaseUntil time.Time + NVDActiveAt *time.Time + NVDActiveBy string + Name string + Owner string + SyncRequestedAt *time.Time + func (WorkerState) TableName() string