portfolios

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VulnerabilityStatsEndpoint is a string representation of the current endpoint for getting vulnerability statistics
	VulnerabilityStatsEndpoint = "v1/animal/getVulnerabilityStats"
	// VulnerabilityListEndpoint is a string representation for getting a list of vulnerabilities by type.
	VulnerabilityListEndpoint = "v1/animal/getVulnerabilityList"
	// VulnerabilityMetricsEndpoint is a string representation for getting a list of vulnerability metrics.
	VulnerabilityMetricsEndpoint = "v1/animal/getScanMetrics"
	// PortfolioPassFailSummaryEndpoint is a string representation for getting a portfolio status summary.
	PortfolioPassFailSummaryEndpoint = "v1/ruleset/getStatuses"
	// PortfolioStartedErroredSummaryEndpoint is a string representation for getting the started and errored count for a list of projects
	PortfolioStartedErroredSummaryEndpoint = "v1/scanner/getStatuses"
	// PortfolioGetAffectedProjectIdsEndpoint is a string representation for getting a list of affected projects.
	PortfolioGetAffectedProjectIdsEndpoint = "v1/animal/getAffectedProjectIds"
	// PortfolioGetAffectedProjectsInfoEndpoint is a string representation for getting the name and version of projects from a list of project ids
	PortfolioGetAffectedProjectsInfoEndpoint = "v1/project/getAffectedProjectsInfo"
	// DependencyStatsEndpoint is a string representation of the current endpoint for getting dependencies statistics
	DependencyStatsEndpoint = "v1/animal/getDependencyStats"
	// DependencyListEndpoint is a string representation for getting a list of vulnerabilities by type.
	DependencyListEndpoint = "v1/animal/getDependencyList"
	// RulesetsGetStatusesHistoryEndpoint is a string representation of the current endpoint for status history of projects
	RulesetsGetStatusesHistoryEndpoint = "v1/ruleset/getStatusesHistory"
	// ReportsGetMttrEndpoint is a string representation of the current endpoint for Mean Time of Remediation of project(s)
	ReportsGetMttrEndpoint = "v1/report/getMttr"
	// PortfolioGetProjectIdsByDependencyEndpoint is a string representation for getting a list of projects by dependency.
	PortfolioGetProjectIdsByDependencyEndpoint = "v1/animal/getProjectIdsByDependency"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AffectedProject

type AffectedProject struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Version         string `json:"version"`
	Vulnerabilities int    `json:"vulnerabilities"`
}

AffectedProject represents a single project affected by a vulnerability

type Dependency added in v0.20.0

type Dependency struct {
	LatestVersion string `json:"latest_version" xml:"latest_version"`
	Org           string `json:"org" xml:"org"`
	Name          string `json:"name" xml:"name"`
	Type          string `json:"type" xml:"type"`
	Package       string `json:"package" xml:"package"`
	Version       string `json:"version" xml:"version"`
	Scope         string `json:"scope" xml:"scope"`
	Requirement   string `json:"requirement" xml:"requirement"`
	File          string `json:"file" xml:"file"`
	ProjectsCount int    `json:"projects_count,omitempty"`
}

Dependency represents data for an individual dependency

type DependencyStat added in v0.20.0

type DependencyStat struct {
	DirectDependencies     int `json:"direct_dependencies"`
	TransitiveDependencies int `json:"transitive_dependencies"`
	OutdatedDependencies   int `json:"outdated_dependencies"`
	NoVersionSpecified     int `json:"no_vesion_dependencies"`
}

DependencyStat represents the dependency stat summary for the portfolio page

type MetricsBody

type MetricsBody struct {
	Metric     string   `json:"metric"`
	ProjectIDs []string `json:"project_ids"`
}

MetricsBody represents the metrics body

type Mttr added in v0.20.0

type Mttr struct {
	Mttr                string          `json:"mttr"`
	UnresolvedIncident  bool            `json:"unresolved_incident"`
	TimeInCurrentStatus string          `json:"time_in_current_status"`
	FailedMttrIncidents int             `json:"failed_mttr_incidents"`
	ProjectCount        int             `json:"project_count"`
	Data                json.RawMessage `json:"data"`
}

Mttr represents the data object for mean time to remediation

type PortfolioListParams added in v0.20.0

type PortfolioListParams struct {
	Ids      []string `json:"ids"`
	ListType string   `json:"list_type,omitempty"`
	Limit    string   `json:"limit,omitempty"`
}

PortfolioListParams represents the vulnerability list paramaters

type PortfolioPassingFailingSummary

type PortfolioPassingFailingSummary struct {
	PassingProjects int `json:"passing_projects"`
	FailingProjects int `json:"failing_projects"`
}

PortfolioPassingFailingSummary represents a summary of passing and failing for projects

type PortfolioRequestedIds

type PortfolioRequestedIds struct {
	IDs []string `json:"ids"`
}

PortfolioRequestedIds represents a list of IDs to send to a request

type PortfolioStartedErroredSummary

type PortfolioStartedErroredSummary struct {
	AnalyzingProjects int `json:"analyzing_projects"`
	ErroredProjects   int `json:"errored_projects"`
	FinishedProjects  int `json:"finished_projects"`
}

PortfolioStartedErroredSummary represents a summary of started and errored statuses for projects

type PortfolioStatusSummary

type PortfolioStatusSummary struct {
	PassingProjects int `json:"passing_projects"`
	FailingProjects int `json:"failing_projects"`
	ErroredProjects int `json:"errored_projects"`
	PendingProjects int `json:"pending_projects"`
}

PortfolioStatusSummary represents a summary of status for projects in a Portfolio

type ProjectsByDependency added in v0.20.0

type ProjectsByDependency struct {
	TeamID     string   `json:"team_id"`
	Name       string   `json:"name"`
	Org        string   `json:"org"`
	Version    string   `json:"version"`
	ProjectIDs []string `json:"project_ids"`
}

ProjectsByDependency represents the projects that have a given dependency

type StatusesHistory added in v0.20.0

type StatusesHistory struct {
	Status         string    `json:"status"`
	Count          int       `json:"count"`
	FirstCreatedAt time.Time `json:"first_created_at"`
}

StatusesHistory represents the number of times in a row the status remained unchanged, and the timestamp of the first one

type VulnerabilityStat

type VulnerabilityStat struct {
	TotalVulnerabilities      int    `json:"total_vulnerabilities"`
	UniqueVulnerabilities     int    `json:"unique_vulnerabilities"`
	MostFrequentVulnerability string `json:"most_frequent_vulnerability"`
}

VulnerabilityStat represents the vulnerabiity stat summary for the portfolio page

Jump to

Keyboard shortcuts

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