Documentation ¶
Index ¶
- Variables
- type DepPackages
- type Manifest
- type Package
- func (p *Package) AddExportedModules(modules []string)
- func (p *Package) AddImportedModules(modules []string)
- func (p *Package) AddScorecard(scorecard *insightapi.Scorecard)
- func (p *Package) AddVulnerabilities(vulns *[]insightapi.PackageVulnerability)
- func (p *Package) GetExportedModules() []string
- func (p *Package) GetImportedModules() []string
- func (p *Package) GetMaxVulnScore() int
- func (p *Package) GetReverseScorecardScore() float32
- func (p *Package) GetScorecardChecks() []PkgScorecardCheck
- func (p *Package) GetScorecardScore() float32
- func (p *Package) GetVulns() []PkgVuln
- func (p *Package) GetVulnsCount() int
- type PackageDetails
- type PkgScorecardCheck
- type PkgVuln
- type PkgVulnSeverity
Constants ¶
This section is empty.
Variables ¶
View Source
var IMPACT_2_IMPACT_STRING = map[string]string{
"VULN_RISK_UNKNOWN": "UNKNOWN",
"VULN_RISK_LOW": "LOW",
"VULN_RISK_MEDIUM": "MEDIUM",
"VULN_RISK_HIGH": "HIGH",
"VULN_RISK_CRITICAL": "CRITICAL",
}
Functions ¶
This section is empty.
Types ¶
type DepPackages ¶
type DepPackages struct {
// contains filtered or unexported fields
}
func (*DepPackages) AddPackage ¶
func (p *DepPackages) AddPackage(pkg *Package)
func (*DepPackages) GetPackages ¶
func (p *DepPackages) GetPackages() []*Package
type Manifest ¶
type Manifest struct { // Filesystem path of this manifest Path string `json:"path"` // When we scan non-path entities like Github org / repo // then only path doesn't make sense, which is more local // temporary file path DisplayPath string `json:"display_path"` // Ecosystem to interpret this manifest Ecosystem string `json:"ecosystem"` }
type Package ¶
type Package struct { PackageDetails PackageDetails Manifest *Manifest // Link to Manifest // contains filtered or unexported fields }
Represents a package manifest that contains a list of packages. Example: pom.xml, requirements.txt
func NewPackage ¶
func NewPackage(pd *PackageDetails, m *Manifest) *Package
func (*Package) AddExportedModules ¶
func (*Package) AddImportedModules ¶
func (*Package) AddScorecard ¶
func (p *Package) AddScorecard(scorecard *insightapi.Scorecard)
func (*Package) AddVulnerabilities ¶
func (p *Package) AddVulnerabilities(vulns *[]insightapi.PackageVulnerability)
func (*Package) GetExportedModules ¶
func (*Package) GetImportedModules ¶
func (*Package) GetMaxVulnScore ¶
func (*Package) GetReverseScorecardScore ¶
return 10-scorecard score
func (*Package) GetScorecardChecks ¶
func (p *Package) GetScorecardChecks() []PkgScorecardCheck
func (*Package) GetScorecardScore ¶
func (*Package) GetVulnsCount ¶
type PackageDetails ¶
type PackageDetails lockfile.PackageDetails
type PkgScorecardCheck ¶
type PkgVuln ¶
type PkgVuln struct { Id string `json:"id"` Cve string `json:"cve"` Aliases []string `json:"aliases"` Title string `json:"title"` BaseSeverity PkgVulnSeverity `json:"severity"` OtherSeverities map[string]PkgVulnSeverity `json:"severities"` }
Click to show internal directories.
Click to hide internal directories.