vulnerabilitysource

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterType

type AdapterType string

AdapterType identifies code-owned provider adapters. Operators can configure instances of these types, but cannot upload parser code.

const (
	AdapterOSV           AdapterType = "osv"
	AdapterCSAF          AdapterType = "csaf"
	AdapterOVAL          AdapterType = "oval"
	AdapterNVD           AdapterType = "nvd"
	AdapterCISAKEV       AdapterType = "cisa_kev"
	AdapterFIRSTEPSS     AdapterType = "first_epss"
	AdapterPublicExploit AdapterType = "public_exploit"
)

func (AdapterType) Valid

func (t AdapterType) Valid() bool

type Source

type Source struct {
	ID            shared.ID       `json:"id"`
	Key           string          `json:"key"`
	Name          string          `json:"name"`
	AdapterType   AdapterType     `json:"adapter_type"`
	Endpoint      string          `json:"endpoint"`
	Enabled       bool            `json:"enabled"`
	Archived      bool            `json:"archived"`
	Cadence       time.Duration   `json:"cadence"`
	StaleAfter    time.Duration   `json:"stale_after"`
	SyncMode      SyncMode        `json:"sync_mode"`
	AdapterConfig json.RawMessage `json:"adapter_config"`
	CredentialRef string          `json:"credential_ref,omitempty"`
	Version       int             `json:"version"`
	CreatedAt     time.Time       `json:"created_at"`
	UpdatedAt     time.Time       `json:"updated_at"`
}

Source is a global, operator-managed provider instance. CredentialRef is a secret-manager reference, never credential material.

func (Source) AllowPrivateNetwork

func (s Source) AllowPrivateNetwork() bool

func (Source) Clone

func (s Source) Clone() Source

func (Source) IntOption

func (s Source) IntOption(name string, fallback int) int

func (*Source) Normalize

func (s *Source) Normalize() error

func (Source) StringListOption

func (s Source) StringListOption(name string) []string

func (Source) Validate

func (s Source) Validate() error

type SyncMode

type SyncMode string
const (
	SyncIncremental SyncMode = "incremental"
	SyncFull        SyncMode = "full"
)

func (SyncMode) Valid

func (m SyncMode) Valid() bool

Jump to

Keyboard shortcuts

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