Documentation
¶
Index ¶
- func ExportPkgloadReports(report PkgLoadReport, pl *v1alpha1.InspectionPolicy)
- type Config
- type Controller
- type Lsof
- type LsofInfo
- type PkgLoadController
- func (c *PkgLoadController) CTRL() Controller
- func (c *PkgLoadController) Run(ctx context.Context, policy *v1alpha1.InspectionPolicy) error
- func (c *PkgLoadController) Scan(ctx context.Context, policy *v1alpha1.InspectionPolicy) error
- func (s *PkgLoadController) WithAdapter(Adapter providers.Adapter) *PkgLoadController
- func (c *PkgLoadController) WithK8sClient(cli client.Client) *PkgLoadController
- func (c *PkgLoadController) WithPkgScanner(client pkgclient.PkgInfoClient) *PkgLoadController
- func (c *PkgLoadController) WithScheme(scheme *runtime.Scheme) *PkgLoadController
- type PkgLoadReport
- type VulnDetail
- type VulnLoaded
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportPkgloadReports ¶
func ExportPkgloadReports(report PkgLoadReport, pl *v1alpha1.InspectionPolicy)
Types ¶
type Controller ¶
type Controller interface { // Run inspection. Run(ctx context.Context, policy *v1alpha1.InspectionPolicy) error }
Controller controls the inspection flow.
type Lsof ¶
type Lsof struct { Command string PID string User string FD string Type string Device string Size string Node string Name string }
Define a struct to hold the parsed fields
type PkgLoadController ¶
type PkgLoadController struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController() *PkgLoadController
NewController news a PkgLoadController.
func (*PkgLoadController) CTRL ¶
func (c *PkgLoadController) CTRL() Controller
CTRL returns PkgLoadController interface.
func (*PkgLoadController) Run ¶
func (c *PkgLoadController) Run(ctx context.Context, policy *v1alpha1.InspectionPolicy) error
func (*PkgLoadController) Scan ¶
func (c *PkgLoadController) Scan(ctx context.Context, policy *v1alpha1.InspectionPolicy) error
func (*PkgLoadController) WithAdapter ¶
func (s *PkgLoadController) WithAdapter(Adapter providers.Adapter) *PkgLoadController
WithAdapter sets adapter.
func (*PkgLoadController) WithK8sClient ¶
func (c *PkgLoadController) WithK8sClient(cli client.Client) *PkgLoadController
WithK8sClient sets k8s client.
func (*PkgLoadController) WithPkgScanner ¶
func (c *PkgLoadController) WithPkgScanner(client pkgclient.PkgInfoClient) *PkgLoadController
func (*PkgLoadController) WithScheme ¶
func (c *PkgLoadController) WithScheme(scheme *runtime.Scheme) *PkgLoadController
WithScheme sets runtime scheme.
type PkgLoadReport ¶
type PkgLoadReport struct { VulnLoaded []VulnLoaded `json:"vulnLoaded"` // vuln loaded NodeName string `json:"nodeName"` // node name CreateTimestamp int64 `json:"createTime"` // unix timestamp DocID string `json:"docID"` // doc id, pkgload-{nodeName}-{createdAt} }
func (PkgLoadReport) GenDocID ¶
func (p PkgLoadReport) GenDocID() string
type VulnDetail ¶
type VulnLoaded ¶
type VulnLoaded struct { // vuln info CVE string `json:"cve"` Severity string `json:"severity"` // pkg info PkgName string `json:"pkgName"` Version string `json:"version"` // runtime PID string `json:"pid"` User string `json:"user"` // k8s info ContainerID string `json:"containerID"` PodName string `json:"podName"` Namespace string `json:"namespace"` NodeName string `json:"nodeName"` ImageName string `json:"imageName"` }
Click to show internal directories.
Click to hide internal directories.