Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Package names are case-insensitive with this prefix PythonPackageRegexPrefix = "(?i)" // Match all possible operators and versions syntax PythonPackageRegexSuffix = "" /* 132-byte string literal not displayed */ )
View Source
const MavenVersionNotAvailableErrorFormat = "Version %s is not available for artifact"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonPackageHandler ¶
type CommonPackageHandler struct {
// contains filtered or unexported fields
}
func (*CommonPackageHandler) SetCommonParams ¶
func (cph *CommonPackageHandler) SetCommonParams(serverDetails *config.ServerDetails, depsRepo string)
func (*CommonPackageHandler) UpdateDependency ¶
func (cph *CommonPackageHandler) UpdateDependency(vulnDetails *utils.VulnerabilityDetails, installationCommand string, extraArgs ...string) (err error)
UpdateDependency updates the impacted package to the fixed version
type GoPackageHandler ¶
type GoPackageHandler struct {
CommonPackageHandler
}
func (*GoPackageHandler) UpdateDependency ¶
func (golang *GoPackageHandler) UpdateDependency(vulnDetails *utils.VulnerabilityDetails) error
type GradlePackageHandler ¶
type GradlePackageHandler struct {
CommonPackageHandler
}
func (*GradlePackageHandler) UpdateDependency ¶
func (gph *GradlePackageHandler) UpdateDependency(vulnDetails *utils.VulnerabilityDetails) error
type MavenPackageHandler ¶
type MavenPackageHandler struct { CommonPackageHandler // mavenDepTreeManager handles the installation and execution of the maven-dep-tree to obtain all the project poms and running mvn commands *java.MavenDepTreeManager // contains filtered or unexported fields }
func NewMavenPackageHandler ¶
func NewMavenPackageHandler(scanDetails *utils.ScanDetails) *MavenPackageHandler
func (*MavenPackageHandler) UpdateDependency ¶
func (mph *MavenPackageHandler) UpdateDependency(vulnDetails *utils.VulnerabilityDetails) (err error)
type NpmPackageHandler ¶
type NpmPackageHandler struct {
CommonPackageHandler
}
func (*NpmPackageHandler) UpdateDependency ¶
func (npm *NpmPackageHandler) UpdateDependency(vulnDetails *utils.VulnerabilityDetails) error
type NugetPackageHandler ¶
type NugetPackageHandler struct {
CommonPackageHandler
}
func (*NugetPackageHandler) UpdateDependency ¶
func (nph *NugetPackageHandler) UpdateDependency(vulnDetails *utils.VulnerabilityDetails) error
type PackageHandler ¶
type PackageHandler interface { UpdateDependency(details *utils.VulnerabilityDetails) error SetCommonParams(serverDetails *config.ServerDetails, depsRepo string) }
PackageHandler interface to hold operations on packages
func GetCompatiblePackageHandler ¶
func GetCompatiblePackageHandler(vulnDetails *utils.VulnerabilityDetails, details *utils.ScanDetails) (handler PackageHandler)
type PythonPackageHandler ¶
type PythonPackageHandler struct { CommonPackageHandler // contains filtered or unexported fields }
PythonPackageHandler Handles all the python package mangers as they share behavior
func (*PythonPackageHandler) UpdateDependency ¶
func (py *PythonPackageHandler) UpdateDependency(vulnDetails *utils.VulnerabilityDetails) error
type UnsupportedPackageHandler ¶
type UnsupportedPackageHandler struct { }
func (*UnsupportedPackageHandler) SetCommonParams ¶
func (uph *UnsupportedPackageHandler) SetCommonParams(serverDetails *config.ServerDetails, depsRepo string)
func (*UnsupportedPackageHandler) UpdateDependency ¶
func (uph *UnsupportedPackageHandler) UpdateDependency(vulnDetails *utils.VulnerabilityDetails) error
type YarnPackageHandler ¶
type YarnPackageHandler struct {
CommonPackageHandler
}
func (*YarnPackageHandler) UpdateDependency ¶
func (yarn *YarnPackageHandler) UpdateDependency(vulnDetails *utils.VulnerabilityDetails) error
Click to show internal directories.
Click to hide internal directories.