integrations

package
v0.0.0-...-aca7f8d Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFetchAllCVEs

func InitFetchAllCVEs(fn CVEHandler) error

func WithContext

func WithContext(ctx context.Context) func(m *SPDXMonitor)

func WithStore

func WithStore(bstore *store.Store) func(m *SPDXMonitor)

Types

type CVEFetchOptions

type CVEFetchOptions struct {
	StartIndex     int
	ResultsPerPage int
	ModStartDate   *time.Time
	ModEndDate     *time.Time
	Sleep          time.Duration
}

func DefaultCVEFetchOptions

func DefaultCVEFetchOptions() CVEFetchOptions

type CVEHandler

type CVEHandler func(*CVEResponse) error

type CVEImpact

type CVEImpact struct {
	BaseMetricV3 struct {
		CVSSV3 struct {
			BaseScore float32 `json:"baseScore"`
		} `json:"cvssV3"`
		ExploitabilityScore float32 `json:"exploitabilityScore"`
		ImpactScore         float32 `json:"impactScore"`
	} `json:"baseMetricV3"`
}

type CVEItem

type CVEItem struct {
	CVEDataMeta struct {
		ID string `json:"ID"`
	} `json:"CVE_data_meta"`
	Description struct {
		DescriptionData []struct {
			Lang  string `json:"lang"`
			Value string `json:"value"`
		} `json:"description_data"`
	} `json:"description"`
	PublishedDate    string `json:"publishedDate"`
	LastModifiedDate string `json:"lastModifiedDate"`
}

type CVEResponse

type CVEResponse struct {
	ResultsPerPage int `json:"resultsPerPage"`
	StartIndex     int `json:"startIndex"`
	TotalResults   int `json:"totalResults"`

	Result struct {
		CVEDataFormat string `json:"CVE_data_format"`
		CVEItems      []struct {
			CVEItem CVEItem   `json:"cve"`
			Impact  CVEImpact `json:"impact"`
		} `json:"CVE_Items"`
	} `json:"result"`
}

func FetchCVEs

func FetchCVEs(opts CVEFetchOptions) (*CVEResponse, error)

type SPDXMonitor

type SPDXMonitor struct {
	// contains filtered or unexported fields
}

func NewSPDXMonitor

func NewSPDXMonitor(opts ...func(m *SPDXMonitor)) (*SPDXMonitor, error)

func (*SPDXMonitor) Do

func (m *SPDXMonitor) Do() error

type SpdxLicense

type SpdxLicense struct {
	LicenseID     string `json:"licenseId"`
	Name          string `json:"name"`
	Reference     string `json:"reference"`
	DetailsURL    string `json:"detailsUrl"`
	IsOSIApproved bool   `json:"isOsiApproved"`
}

type SpdxLicenseList

type SpdxLicenseList struct {
	ListVersion string        `json:"licenseListVersion"`
	Licenses    []SpdxLicense `json:"licenses"`
	ReleaseDate string        `json:"releaseDate"`
}

type SpdxRelease

type SpdxRelease struct {
	TagName string `json:"tag_name"`
}

type SpdxSBOMModel

type SpdxSBOMModel struct {
	Version    string `json:"Version,omitempty"`
	Name       string
	Path       string `json:"Path,omitempty"`
	LocalPath  string
	Supplier   SupplierContact
	PackageURL string
	// CheckSum                *CheckSum
	PackageHomePage         string
	PackageDownloadLocation string
	LicenseConcluded        string
	LicenseDeclared         string
	CommentsLicense         string
	// OtherLicense            []*License
	Copyright      string
	PackageComment string
	Root           bool
}

func ParseSBOM

func ParseSBOM(filename string) ([]SpdxSBOMModel, error)

type SupplierContact

type SupplierContact struct {
	Name  string
	Email string
}

SupplierContact ...

Jump to

Keyboard shortcuts

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