vulnerabilityintel

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPageSize = 500

Variables

This section is empty.

Functions

func NormalizeLimit

func NormalizeLimit(limit int) int

Types

type AdvisoryActionSummary

type AdvisoryActionSummary struct {
	States []vulnerabilityaction.ActionStatus
}

type AdvisoryCoverageRequest added in v0.2.0

type AdvisoryCoverageRequest struct {
	AdvisoryID string
	Revision   int64
}

type AdvisoryCoverageSummary added in v0.2.0

type AdvisoryCoverageSummary struct {
	State  CoverageState
	Reason string
}

type AdvisoryDailyImpact added in v0.2.0

type AdvisoryDailyImpact struct {
	NewlyDisclosed int64
	NewlyIngested  int64
}

type AdvisoryItem

type AdvisoryItem struct {
	Canonical              advisory.Canonical                 `json:"canonical"`
	Revision               int64                              `json:"revision"`
	ChangedFields          []advisory.ChangedField            `json:"changed_fields,omitempty"`
	ChangedAt              time.Time                          `json:"changed_at"`
	ActiveAffectedCount    int64                              `json:"active_affected_count"`
	AffectedAssetCount     int64                              `json:"affected_asset_count"`
	AffectedComponentCount int64                              `json:"affected_component_count"`
	RiskPriority           int                                `json:"risk_priority"`
	PreviousRiskPriority   int                                `json:"previous_risk_priority"`
	RiskTrend              RiskTrend                          `json:"risk_trend"`
	RiskScore              float64                            `json:"risk_score"`
	RiskScoreChange        float64                            `json:"risk_score_change"`
	DetectionStates        []vulnerabilityoccurrence.State    `json:"detection_states,omitempty"`
	ActionStates           []vulnerabilityaction.ActionStatus `json:"action_states,omitempty"`
	LastEvaluation         *time.Time                         `json:"last_evaluation,omitempty"`
	CoverageState          CoverageState                      `json:"coverage_state"`
	CoverageReason         string                             `json:"coverage_reason"`
}

type AdvisoryOccurrenceSummary

type AdvisoryOccurrenceSummary struct {
	ActiveAffectedCount    int64
	AffectedAssetCount     int64
	AffectedComponentCount int64
	DetectionStates        []vulnerabilityoccurrence.State
	LastEvaluation         *time.Time
	MatchesAffectedAsset   bool
	MatchesDetectionState  bool
}

type AdvisoryPage

type AdvisoryPage struct {
	Items []AdvisoryItem `json:"items"`
	Next  string         `json:"next,omitempty"`
}

type AdvisoryQuery

type AdvisoryQuery struct {
	AfterID         string
	Search          string
	Statuses        []advisory.Status
	KEV             *bool
	MinCVSS         *float64
	MaxCVSS         *float64
	Source          string
	Limit           int
	RiskPriorities  []int
	RiskTrends      []RiskTrend
	AffectedAsset   string
	DetectionStates []vulnerabilityoccurrence.State
	ActionStates    []vulnerabilityaction.ActionStatus
	NoActions       bool
}

func (AdvisoryQuery) Normalize

func (q AdvisoryQuery) Normalize() AdvisoryQuery

type AdvisoryRevisionItem

type AdvisoryRevisionItem struct {
	Canonical     advisory.Canonical      `json:"canonical"`
	Revision      int64                   `json:"revision"`
	ChangedFields []advisory.ChangedField `json:"changed_fields,omitempty"`
	SyncRunIDs    []shared.ID             `json:"sync_run_ids,omitempty"`
	ChangedAt     time.Time               `json:"changed_at"`
}
type AdvisoryRevisionLink struct {
	AdvisoryID string    `json:"advisory_id"`
	Revision   int64     `json:"revision"`
	ChangedAt  time.Time `json:"changed_at"`
}

type AdvisoryRevisionLinkPage

type AdvisoryRevisionLinkPage struct {
	Items     []AdvisoryRevisionLink
	Truncated bool
}

type AdvisoryRevisionPage

type AdvisoryRevisionPage struct {
	Items []AdvisoryRevisionItem `json:"items"`
	Next  int64                  `json:"next,omitempty"`
}

type AdvisoryRevisionQuery

type AdvisoryRevisionQuery struct {
	AdvisoryID     string
	BeforeRevision int64
	Limit          int
}

type AdvisoryRiskSummary

type AdvisoryRiskSummary struct {
	Priority         int
	PreviousPriority int
	Trend            RiskTrend
	Score            float64
	ScoreChange      float64
}

type AssessmentPage

type AssessmentPage struct {
	Items []vulnerabilityrisk.Assessment `json:"items"`
	Next  *Cursor                        `json:"next,omitempty"`
}

type AssessmentQuery

type AssessmentQuery struct {
	TenantID     shared.ID
	OccurrenceID shared.ID
	Cursor       Cursor
	Limit        int
}

type CoverageState added in v0.2.0

type CoverageState string

CoverageState describes what persisted inventory and completed reconciliation work can prove for one tenant and advisory. A zero match is deliberately not enough to claim that the advisory was evaluated and did not affect the tenant.

const (
	CoverageAffected             CoverageState = "affected"
	CoverageEvaluatedNotAffected CoverageState = "evaluated_not_affected"
	CoverageNotEvaluated         CoverageState = "not_evaluated"
	CoverageUnsupportedIdentity  CoverageState = "unsupported_identity"
	CoverageIncompleteInventory  CoverageState = "incomplete_inventory"
)

func (CoverageState) Valid added in v0.2.0

func (value CoverageState) Valid() bool

type Cursor

type Cursor struct {
	BeforeTime time.Time `json:"before_time,omitempty"`
	BeforeID   string    `json:"before_id,omitempty"`
}

type EvaluationLag

type EvaluationLag struct {
	AdvisoryID        string    `json:"advisory_id"`
	CurrentRevision   int64     `json:"current_revision"`
	EvaluatedRevision int64     `json:"evaluated_revision"`
	ChangedAt         time.Time `json:"changed_at"`
}

type OccurrencePage

type OccurrencePage struct {
	Items []vulnerabilityoccurrence.Occurrence `json:"items"`
	Next  *Cursor                              `json:"next,omitempty"`
}

type OccurrenceQuery

type OccurrenceQuery struct {
	TenantID     shared.ID
	EngagementID shared.ID
	AdvisoryID   string
	States       []vulnerabilityoccurrence.State
	Cursor       Cursor
	Limit        int
}

type Overview

type Overview struct {
	EnabledSources             int            `json:"enabled_sources"`
	StaleOrFailedSources       int            `json:"stale_or_failed_sources"`
	LastSuccessfulSync         *time.Time     `json:"last_successful_sync,omitempty"`
	ChangedAdvisories24Hours   int64          `json:"changed_advisories_24_hours"`
	NewlyDisclosed24Hours      int64          `json:"newly_disclosed_24_hours"`
	NewlyIngested24Hours       int64          `json:"newly_ingested_24_hours"`
	NewlyAffectedAssets24Hours int64          `json:"newly_affected_assets_24_hours"`
	OldestUnevaluated          *EvaluationLag `json:"oldest_unevaluated_revision,omitempty"`
	OpenHighCriticalExposure   int64          `json:"open_high_critical_exposure"`
	PendingRiskActions         int64          `json:"pending_risk_actions"`
	QueueDepth                 int            `json:"queue_depth"`
	DeadLetters                int            `json:"dead_letters"`
}

type RiskTrend

type RiskTrend string
const (
	RiskTrendNone      RiskTrend = "none"
	RiskTrendNew       RiskTrend = "new"
	RiskTrendIncreased RiskTrend = "increased"
	RiskTrendDecreased RiskTrend = "decreased"
	RiskTrendUnchanged RiskTrend = "unchanged"
)

func (RiskTrend) Valid

func (value RiskTrend) Valid() bool

type SyncRunItem

type SyncRunItem struct {
	Run          vulnerabilitysync.Run
	Attempts     int
	DeadLettered bool
}

type SyncRunPage

type SyncRunPage struct {
	Items []SyncRunItem
	Next  *Cursor
}

type SyncRunQuery

type SyncRunQuery struct {
	TenantID        shared.ID
	SourceID        shared.ID
	States          []vulnerabilitysync.State
	Modes           []vulnerabilitysync.Mode
	Trigger         string
	CreatedAtFrom   time.Time
	CreatedAtBefore time.Time
	Cursor          Cursor
	Limit           int
}

type TransitionPage

type TransitionPage struct {
	Items []vulnerabilityaction.Transition `json:"items"`
	Next  *Cursor                          `json:"next,omitempty"`
}

type TransitionQuery

type TransitionQuery struct {
	TenantID     shared.ID
	OccurrenceID shared.ID
	Cursor       Cursor
	Limit        int
}

Jump to

Keyboard shortcuts

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