Documentation ¶
Index ¶
- Variables
- type Advisory
- type Detector
- type Driver
- type DriverFactory
- type Factory
- type MockOperation
- func (_m *MockOperation) ApplyDetectExpectation(e OperationDetectExpectation)
- func (_m *MockOperation) ApplyDetectExpectations(expectations []OperationDetectExpectation)
- func (_m *MockOperation) Detect(imageName string, filePath string, created time.Time, pkgs []types.LibraryInfo) ([]pkgtypes.DetectedVulnerability, error)
- type Operation
- type OperationDetectArgs
- type OperationDetectExpectation
- type OperationDetectReturns
Constants ¶
This section is empty.
Variables ¶
View Source
var SuperSet = wire.NewSet( wire.Struct(new(DriverFactory)), wire.Bind(new(Factory), new(DriverFactory)), NewDetector, wire.Bind(new(Operation), new(Detector)), )
Functions ¶
This section is empty.
Types ¶
type Advisory ¶ added in v0.11.0
type Advisory struct {
// contains filtered or unexported fields
}
Advisory represents security advisories for each programming language
func NewAdvisory ¶ added in v0.11.0
func (*Advisory) DetectVulnerabilities ¶ added in v0.11.0
func (s *Advisory) DetectVulnerabilities(pkgName string, pkgVer *semver.Version) ([]types.DetectedVulnerability, error)
DetectVulnerabilities scans buckets with the prefix according to the programming language in "Advisory". If "lang" is python, it looks for buckets with "python::" and gets security advisories from those buckets. It allows us to add a new data source with the lang prefix (e.g. python::new-data-source) and detect vulnerabilities without specifying a specific bucket name.
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
func NewDetector ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
type DriverFactory ¶
type DriverFactory struct{}
type MockOperation ¶ added in v0.5.0
MockOperation is an autogenerated mock type for the Operation type
func (*MockOperation) ApplyDetectExpectation ¶ added in v0.5.0
func (_m *MockOperation) ApplyDetectExpectation(e OperationDetectExpectation)
func (*MockOperation) ApplyDetectExpectations ¶ added in v0.5.0
func (_m *MockOperation) ApplyDetectExpectations(expectations []OperationDetectExpectation)
func (*MockOperation) Detect ¶ added in v0.5.0
func (_m *MockOperation) Detect(imageName string, filePath string, created time.Time, pkgs []types.LibraryInfo) ([]pkgtypes.DetectedVulnerability, error)
Detect provides a mock function with given fields: imageName, filePath, created, pkgs
type Operation ¶
type Operation interface {
Detect(imageName string, filePath string, created time.Time, pkgs []ftypes.LibraryInfo) (vulns []types.DetectedVulnerability, err error)
}
type OperationDetectArgs ¶ added in v0.5.0
type OperationDetectExpectation ¶ added in v0.5.0
type OperationDetectExpectation struct { Args OperationDetectArgs Returns OperationDetectReturns }
type OperationDetectReturns ¶ added in v0.5.0
type OperationDetectReturns struct { Vulns []pkgtypes.DetectedVulnerability Err error }
Click to show internal directories.
Click to hide internal directories.