api

package
v0.0.0-...-167ca65 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(apikey string, opts ...Option) error

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithBaseURL

func WithBaseURL(url string) Option

func WithDir

func WithDir(dir string) Option

func WithRetry

func WithRetry(retry int) Option

type Result

type Result struct {
	URI            string   `json:"uri,omitempty"`
	ID             string   `json:"id,omitempty"`
	Name           string   `json:"name,omitempty"`
	Author         []string `json:"author,omitempty"`
	Tags           []string `json:"tags,omitempty"`
	Severity       string   `json:"severity,omitempty"`
	Type           string   `json:"type,omitempty"`
	Dir            string   `json:"dir,omitempty"`
	Ref            string   `json:"ref,omitempty"`
	Vendor         string   `json:"vendor,omitempty"`
	Product        string   `json:"product,omitempty"`
	Classification struct {
		CVEID          []string `json:"cve-id,omitempty"`
		CWEID          []string `json:"cwe-id,omitempty"`
		CVSSMetrics    string   `json:"cvss-metrics,omitempty"`
		CVSSScore      float64  `json:"cvss-score,omitempty"`
		EPSSScore      float64  `json:"epss-score,omitempty"`
		EPSSPercentile float64  `json:"epss-percentile,omitempty"`
		CPE            string   `json:"cpe,omitempty"`
	} `json:"classification,omitzero"`
	Metadata    interface{} `json:"metadata,omitempty"`
	Digest      string      `json:"digest,omitempty"`
	CreatedAt   time.Time   `json:"created_at,omitempty"`
	UpdatedAt   time.Time   `json:"updated_at,omitempty"`
	ReleaseTag  string      `json:"release_tag,omitempty"`
	IsEarly     bool        `json:"is_early,omitempty"`
	Raw         string      `json:"raw,omitempty"`
	TemplateID  string      `json:"template_id,omitempty"`
	Description string      `json:"description,omitempty"`
	Filename    string      `json:"filename,omitempty"`
	Impact      string      `json:"impact,omitempty"`
	AIMeta      struct {
		ModelUsed         string `json:"model_used,omitempty"`
		IsPromptByHuman   bool   `json:"is_prompt_by_human,omitempty"`
		IsTemplateByHuman bool   `json:"is_template_by_human,omitempty"`
		Prompt            string `json:"prompt,omitempty"`
	} `json:"ai_meta,omitzero"`
	References   []string `json:"references,omitempty"`
	TemplateType string   `json:"template_type,omitempty"`
	IsDraft      bool     `json:"is_draft,omitempty"`
	IsGitHub     bool     `json:"is_github,omitempty"`
	IsNew        bool     `json:"is_new,omitempty"`
	IsPDResearch bool     `json:"is_pdresearch,omitempty"`
	IsPDTeam     bool     `json:"is_pdteam,omitempty"`
	IsPDTemplate bool     `json:"is_pdtemplate,omitempty"`
	Remediation  string   `json:"remediation,omitempty"`
}

Jump to

Keyboard shortcuts

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