client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Spec Spec
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, logger zerolog.Logger, s *Spec) (Client, error)

func (*Client) ID

func (c *Client) ID() string

func (*Client) Logger

func (c *Client) Logger() *zerolog.Logger

func (*Client) UpwindClient

func (c *Client) UpwindClient() *sdk.Client

UpwindClient returns the underlying Upwind SDK client

type Spec

type Spec struct {
	// ClientID is the OAuth2 client ID for Upwind API authentication (required)
	ClientID string `json:"client_id,omitempty"`

	// ClientSecret is the OAuth2 client secret for Upwind API authentication (required)
	ClientSecret string `json:"client_secret,omitempty"`

	// OrganizationID is the Upwind organization ID (required)
	OrganizationID string `json:"organization_id,omitempty"`

	// Region is the API region (US, EU, or ME). Defaults to US
	Region string `json:"region,omitempty"`

	// BaseURL is the API base URL (optional, derived from region if not provided)
	BaseURL string `json:"base_url,omitempty"`

	// MaxRetries is the maximum number of retry attempts for failed requests. Defaults to 3
	MaxRetries int `json:"max_retries,omitempty"`

	// MaxConcurrency is the maximum number of concurrent API requests. Defaults to 10
	MaxConcurrency int `json:"max_concurrency,omitempty"`

	// PageSize is the default page size for paginated requests. Defaults to 100
	PageSize int `json:"page_size,omitempty"`

	// RateLimitPerSecond is the maximum number of requests per second (0 = no limit). Defaults to 10
	RateLimitPerSecond int `json:"rate_limit_per_second,omitempty"`

	// VulnerabilityFilters contains optional filters for vulnerability findings
	VulnerabilityFilters VulnerabilityFilters `json:"vulnerability_filters,omitempty"`
}

Spec defines the configuration for the Upwind CloudQuery plugin

func (*Spec) SetDefaults

func (s *Spec) SetDefaults()

func (*Spec) Validate

func (s *Spec) Validate() error

type VulnerabilityFilters

type VulnerabilityFilters struct {
	// CloudAccountID filters by cloud account ID
	CloudAccountID string `json:"cloud_account_id,omitempty"`

	// ClusterID filters by Kubernetes cluster ID
	ClusterID string `json:"cluster_id,omitempty"`

	// Namespace filters by Kubernetes namespace
	Namespace string `json:"namespace,omitempty"`

	// IsExposed filters by internet exposure (ingress active communication)
	IsExposed *bool `json:"is_exposed,omitempty"`

	// HasInternetExposure filters by internet exposure
	HasInternetExposure *bool `json:"has_internet_exposure,omitempty"`

	// IsInUse filters by whether the package is in use
	IsInUse *bool `json:"is_in_use,omitempty"`

	// IsExploitable filters by whether the vulnerability is exploitable
	IsExploitable *bool `json:"is_exploitable,omitempty"`

	// IsFixed filters by whether a fix is available
	IsFixed *bool `json:"is_fixed,omitempty"`

	// Severity filters by severity level (LOW, MEDIUM, HIGH, CRITICAL)
	Severity string `json:"severity,omitempty"`

	// ImageName filters by container image name
	ImageName string `json:"image_name,omitempty"`

	// Framework filters by package framework
	Framework string `json:"framework,omitempty"`
}

VulnerabilityFilters contains optional filters for vulnerability findings

Jump to

Keyboard shortcuts

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