oss

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertOssJsonToIssues

func ConvertOssJsonToIssues(workDir string, res []byte, includeIgnores bool) ([]types.IssueData, error)

func ConvertToIssue

func ConvertToIssue(workDir string, scanResults []ScanResult, includeIgnores bool) []types.IssueData

Types

type Annotation

type Annotation struct {
	Value  string `json:"value,omitempty"`
	Reason string `json:"reason,omitempty"`
}

type AppliedPolicyRules

type AppliedPolicyRules struct {
	Annotation     Annotation     `json:"annotation,omitempty"`
	SeverityChange SeverityChange `json:"severityChange,omitempty"`
}

type CvssSource

type CvssSource struct {
	Type             string  `json:"type"`
	Vector           string  `json:"vector"`
	Assigner         string  `json:"assigner"`
	Severity         string  `json:"severity"`
	BaseScore        float64 `json:"baseScore"`
	CvssVersion      string  `json:"cvssVersion"`
	ModificationTime string  `json:"modificationTime"`
}

type Insights

type Insights struct {
	TriageAdvice any `json:"triageAdvice"`
}

type OssIssueData

type OssIssueData struct {
	Key                string             `json:"key"`
	Title              string             `json:"title"`
	Name               string             `json:"name"`
	LineNumber         int                `json:"lineNumber"`
	Description        string             `json:"description"`
	Version            string             `json:"version"`
	License            string             `json:"license,omitempty"`
	PackageManager     string             `json:"packageManager"`
	PackageName        string             `json:"packageName"`
	From               []string           `json:"from"`
	FixedIn            []string           `json:"fixedIn,omitempty"`
	UpgradePath        []any              `json:"upgradePath,omitempty"`
	IsUpgradable       bool               `json:"isUpgradable,omitempty"`
	CVSSv3             string             `json:"CVSSv3,omitempty"`
	CvssScore          float64            `json:"cvssScore,omitempty"`
	CvssSources        []CvssSource       `json:"cvssSources,omitempty"`
	Exploit            string             `json:"exploit,omitempty"`
	IsPatchable        bool               `json:"isPatchable"`
	ProjectName        string             `json:"projectName"`
	DisplayTargetFile  types.FilePath     `json:"displayTargetFile"`
	Language           string             `json:"language"`
	Details            string             `json:"details"`
	MatchingIssues     []OssIssueData     `json:"matchingIssues"`
	Lesson             string             `json:"lesson,omitempty"`
	Remediation        string             `json:"remediation"`
	AppliedPolicyRules AppliedPolicyRules `json:"appliedPolicyRules,omitempty"`
}

type ProjectIgnorePath

type ProjectIgnorePath struct {
	Module string `json:"module,omitempty"`
}

type ProjectIgnoredBy

type ProjectIgnoredBy struct {
	Id            string `json:"id,omitempty"`
	Name          string `json:"name,omitempty"`
	Email         string `json:"email,omitempty"`
	IsGroupPolicy bool   `json:"isGroupPolicy,omitempty"`
}

type ScanResult

type ScanResult struct {
	Vulnerabilities   []ossIssue     `json:"vulnerabilities"`
	Ok                bool           `json:"ok"`
	DependencyCount   int            `json:"dependencyCount"`
	Policy            string         `json:"policy"`
	IsPrivate         bool           `json:"isPrivate"`
	LicensesPolicy    licensesPolicy `json:"licensesPolicy"`
	PackageManager    string         `json:"packageManager"`
	IgnoreSettings    ignoreSettings `json:"ignoreSettings"`
	Summary           string         `json:"summary"`
	FilesystemPolicy  bool           `json:"filesystemPolicy"`
	UniqueCount       int            `json:"uniqueCount"`
	ProjectName       string         `json:"projectName"`
	FoundProjectCount int            `json:"foundProjectCount"`
	DisplayTargetFile string         `json:"displayTargetFile"`
	Path              string         `json:"path"`
	Remediation       remediation    `json:"remediation,omitempty"`
	Filtered          struct {
		Ignore []any `json:"ignore"`
		Patch  []any `json:"patch"`
	} `json:"filtered,omitempty"`
}

type SeverityChange

type SeverityChange struct {
	OriginalSeverity string `json:"originalSeverity"`
	NewSeverity      string `json:"newSeverity"`
	Reason           string `json:"reason"`
}

Jump to

Keyboard shortcuts

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