From d1695b7f1075492f16a086d4a4fad86d4e74446c Mon Sep 17 00:00:00 2001 From: dwertent Date: Mon, 31 Jan 2022 18:41:45 +0200 Subject: [PATCH] support vuln scan --- clihandler/initcli.go | 7 +- clihandler/initcliutils.go | 7 +- registryadaptors/README.md | 164 ++++++++++++++++++ registryadaptors/armosec/v1/civarmoadaptor.go | 49 ++---- .../armosec/v1/civarmoadaptor_test.go | 41 +---- .../armosec/v1/civarmoadaptormock.go | 71 ++++---- .../armosec/v1/civarmoadaptorutils.go | 33 +++- registryadaptors/armosec/v1/datastructures.go | 4 +- resourcehandler/filesloader.go | 12 +- resourcehandler/k8sresources.go | 9 +- resourcehandler/registrydata.go | 147 ++++++++++++++++ 11 files changed, 420 insertions(+), 124 deletions(-) create mode 100644 registryadaptors/README.md create mode 100644 resourcehandler/registrydata.go diff --git a/clihandler/initcli.go b/clihandler/initcli.go index 429cb854..375b2638 100644 --- a/clihandler/initcli.go +++ b/clihandler/initcli.go @@ -63,7 +63,12 @@ func getInterfaces(scanInfo *cautils.ScanInfo) componentInterfaces { scanInfo.ExcludedNamespaces = fmt.Sprintf("%s,%s", scanInfo.ExcludedNamespaces, hostSensorHandler.GetNamespace()) } - resourceHandler := getResourceHandler(scanInfo, tenantConfig, k8s, hostSensorHandler) + registryAdaptors, err := resourcehandler.NewRegistryAdaptors() + if err != nil { + // display warning + } + + resourceHandler := getResourceHandler(scanInfo, tenantConfig, k8s, hostSensorHandler, registryAdaptors) // reporting behavior - setup reporter reportHandler := getReporter(tenantConfig, scanInfo.Submit) diff --git a/clihandler/initcliutils.go b/clihandler/initcliutils.go index fd60a02b..1c231dc5 100644 --- a/clihandler/initcliutils.go +++ b/clihandler/initcliutils.go @@ -55,12 +55,13 @@ func getReporter(tenantConfig cautils.ITenantConfig, submit bool) reporter.IRepo return reporterv1.NewReportMock() } -func getResourceHandler(scanInfo *cautils.ScanInfo, tenantConfig cautils.ITenantConfig, k8s *k8sinterface.KubernetesApi, hostSensorHandler hostsensorutils.IHostSensor) resourcehandler.IResourceHandler { +func getResourceHandler(scanInfo *cautils.ScanInfo, tenantConfig cautils.ITenantConfig, k8s *k8sinterface.KubernetesApi, hostSensorHandler hostsensorutils.IHostSensor, registryAdaptors *resourcehandler.RegistryAdaptors) resourcehandler.IResourceHandler { if len(scanInfo.InputPatterns) > 0 || k8s == nil { - return resourcehandler.NewFileResourceHandler(scanInfo.InputPatterns) + return resourcehandler.NewFileResourceHandler(scanInfo.InputPatterns, registryAdaptors) } + getter.GetArmoAPIConnector() rbacObjects := getRBACHandler(tenantConfig, k8s, scanInfo.Submit) - return resourcehandler.NewK8sResourceHandler(k8s, getFieldSelector(scanInfo), hostSensorHandler, rbacObjects) + return resourcehandler.NewK8sResourceHandler(k8s, getFieldSelector(scanInfo), hostSensorHandler, rbacObjects, registryAdaptors) } func getHostSensorHandler(scanInfo *cautils.ScanInfo, k8s *k8sinterface.KubernetesApi) hostsensorutils.IHostSensor { diff --git a/registryadaptors/README.md b/registryadaptors/README.md new file mode 100644 index 00000000..abf0688e --- /dev/null +++ b/registryadaptors/README.md @@ -0,0 +1,164 @@ +# Container image vulnerability adaptor interface + +## High level design of Kubescape + +### Layers + +* Controls and Rules: that actual control logic implementation, the "tests" themselves. Implemented in rego +* OPA engine: the [OPA](https://github.com/open-policy-agent/opa) rego interpreter +* Rules processor: Kubescape component, it enumerates and runs the controls while also preparing the all the input data that the controls need for running +* Data sources: set of different modules providing data to the Rules processor so it can run the controls with them. Examples: Kubernetes objects, cloud vendor API objects and adding in this proposal the vulnerability infomration +* Cloud Image Vulnerability adaption interface: the subject of this proposal, it gives a common interface for different registry/vulnerabilty vendors to adapt to. +* CIV adaptors: specific implementation of the CIV interface, example Harbor adaption +``` + ----------------------- +| Controls/Rules (rego) | + ----------------------- + | + ----------------------- +| OPA engine | + ----------------------- + | + ----------------------- +| Rules processor | + ----------------------- + | + ----------------------- +| Data sources | + ----------------------- + | + ======================= +| CIV adaption interface| <- Adding this layer in this proposal + ======================= + | + ----------------------- +| Specific CIV adaptors | <- Will be implemented based on this proposal + ----------------------- + + + +``` + +## Functionalities to cover + +The interface needs to cover the following functionalities: + +* Authentication against the information source (abstracted login) +* Triggering image scan (if applicable, the source might store vulnerabilities for images but cannot scan alone) +* Reading image scan status (with last scan date and etc.) +* Getting vulnerability information for a given image +* Getting image information + * Image manifests + * Image BOMs (bill of material) + +## Go API proposal + +``` + +/*type ContainerImageRegistryCredentials struct { + Password string + Tag string + Hash string +}*/ + +type ContainerImageIdentifier struct { + Registry string + Repository string + Tag string + Hash string +} + +type ContainerImageScanStatus struct { + ImageID ContainerImageIdentifier + IsScanAvailable bool + IsBomAvailable bool + LastScanDate time.Time +} + +type ContainerImageVulnerabilityReport struct { + ImageID ContainerImageIdentifier + // TBD +} + +type ContainerImageInformation struct { + ImageID ContainerImageIdentifier + Bom []string + ImageManifest Manifest // will use here Docker package definition +} + +type IContainerImageVulnerabilityAdaptor interface { + // Credentials are coming from user input (CLI or configuration file) and they are abstracted at string to string map level + // so and example use would be like registry: "simpledockerregistry:80" and credentials like {"username":"joedoe","password":"abcd1234"} + Login(registry string, credentials map[string]string) error + + // For "help" purposes + DescribeAdaptor() string + + GetImagesScanStatus(imageIDs []ContainerImageIdentifier) ([]ContainerImageScanStatus, error) + + GetImagesVulnerabilties(imageIDs []ContainerImageIdentifier) ([]ContainerImageVulnerabilityReport, error) + + GetImagesInformation(imageIDs []ContainerImageIdentifier) ([]ContainerImageInformation, error) +} +``` + + + +# Integration + +# Input + +The objects received from the interface will be converted to an IMetadata compatible objects as following + +``` +{ + "apiVersion": "image.vulnscan.com/v1", + "kind": "ImageVulnerabilities", + "metadata": { + "name": "nginx:latest" + }, + "data": { + // list of vulnerabilities + } +} +``` + + +# Output + +The rego results will be a combination of the k8s artifact and the list of relevant CVEs for the control + +``` +{ + "apiVersion": "result.vulnscan.com/v1", + "kind": "Pod", + "metadata": { + "name": "nginx" + "namespace": "default" + + }, + "relatedObjects": [ + { + "apiVersion": "v1", + "kind": "Pod", + "metadata": { + "name": "nginx" + "namespace": "default" + }, + "spec": { + // podSpec + }, + }, + { + "apiVersion": "image.vulnscan.com/v1", + "kind": "ImageVulnerabilities", + "metadata": { + "name": "nginx:latest", + }, + "data": { + // list of vulnerabilities + } + } + ] +} +``` \ No newline at end of file diff --git a/registryadaptors/armosec/v1/civarmoadaptor.go b/registryadaptors/armosec/v1/civarmoadaptor.go index 9add8096..134d53f0 100644 --- a/registryadaptors/armosec/v1/civarmoadaptor.go +++ b/registryadaptors/armosec/v1/civarmoadaptor.go @@ -12,20 +12,20 @@ import ( ) func NewArmoAdaptor(registry string, credentials map[string]string) (*ArmoCivAdaptor, error) { - var accountId string + var accountID string var accessKey string - var clientId string + var clientID string var ok bool - if accountId, ok = credentials["accountId"]; !ok { - return nil, fmt.Errorf("define accountId in credentials") + if accountID, ok = credentials["accountID"]; !ok { + return nil, fmt.Errorf("define accountID in credentials") } - if clientId, ok = credentials["clientId"]; !ok { - return nil, fmt.Errorf("define clientId in credentials") + if clientID, ok = credentials["clientID"]; !ok { + return nil, fmt.Errorf("define clientID in credentials") } if accessKey, ok = credentials["accessKey"]; !ok { return nil, fmt.Errorf("define accessKey in credentials") } - armoCivAdaptor := ArmoCivAdaptor{registry: registry, accountId: accountId, clientId: clientId, accessKey: accessKey} + armoCivAdaptor := ArmoCivAdaptor{registry: registry, clientID: clientID, accountID: accountID, accessKey: accessKey} err := armoCivAdaptor.initializeUrls() if err != nil { return nil, err @@ -34,7 +34,7 @@ func NewArmoAdaptor(registry string, credentials map[string]string) (*ArmoCivAda } func (armoCivAdaptor *ArmoCivAdaptor) Login() error { - feLoginData := FeLoginData{ClientId: armoCivAdaptor.clientId, Secret: armoCivAdaptor.accessKey} + feLoginData := FeLoginData{ClientId: armoCivAdaptor.clientID, Secret: armoCivAdaptor.accessKey} body, _ := json.Marshal(feLoginData) authApiTokenEndpoint := fmt.Sprintf("%s/frontegg/identity/resources/auth/v1/api-token", armoCivAdaptor.armoUrls.AuthUrl) @@ -53,11 +53,12 @@ func (armoCivAdaptor *ArmoCivAdaptor) Login() error { return err } var feLoginResponse FeLoginResponse - err = json.Unmarshal(responseBody, &feLoginResponse) - armoCivAdaptor.feToken = feLoginResponse - if err != nil { + + if err = json.Unmarshal(responseBody, &feLoginResponse); err != nil { return err } + armoCivAdaptor.feToken = feLoginResponse + /* Now we have JWT */ armoCivAdaptor.authCookie, err = armoCivAdaptor.getAuthCookie() @@ -84,12 +85,16 @@ func (armoCivAdaptor *ArmoCivAdaptor) GetImageVulnerability(imageID *registryvul if err != nil { return nil, err } + if containerScanId == "" { + return nil, fmt.Errorf("last scan ID is empty") + } + filter := []map[string]string{{"containersScanID": containerScanId}} pageSize := 300 pageNumber := 1 request := V2ListRequest{PageSize: &pageSize, PageNum: &pageNumber, InnerFilters: filter, OrderBy: "timestamp:desc"} requestBody, _ := json.Marshal(request) - requestUrl := fmt.Sprintf("%s/api/v1/vulnerability/scanResultsDetails?customerGUID=%s", armoCivAdaptor.armoUrls.BackendUrl, armoCivAdaptor.accountId) + requestUrl := fmt.Sprintf("%s/api/v1/vulnerability/scanResultsDetails?customerGUID=%s", armoCivAdaptor.armoUrls.BackendUrl, armoCivAdaptor.accountID) client := &http.Client{} httpRequest, err := http.NewRequest("POST", requestUrl, bytes.NewBuffer(requestBody)) if err != nil { @@ -126,25 +131,7 @@ func (armoCivAdaptor *ArmoCivAdaptor) GetImageVulnerability(imageID *registryvul return nil, err } - vulnerabilities := make([]registryvulnerabilities.Vulnerability, len(scanDetailsResult.Response)) - for i, vulnerabilityEntry := range scanDetailsResult.Response { - vulnerabilities[i].Description = vulnerabilityEntry.Description - vulnerabilities[i].Fixes = make([]registryvulnerabilities.FixedIn, len(vulnerabilityEntry.Fixes)) - for j, fix := range vulnerabilityEntry.Fixes { - vulnerabilities[i].Fixes[j].ImgTag = fix.ImgTag - vulnerabilities[i].Fixes[j].Name = fix.Name - vulnerabilities[i].Fixes[j].Version = fix.Version - } - vulnerabilities[i].HealthStatus = vulnerabilityEntry.HealthStatus - vulnerabilities[i].Link = vulnerabilityEntry.Link - vulnerabilities[i].Metadata = vulnerabilityEntry.Metadata - vulnerabilities[i].Name = vulnerabilityEntry.Name - vulnerabilities[i].PackageVersion = vulnerabilityEntry.PackageVersion - vulnerabilities[i].RelatedPackageName = vulnerabilityEntry.RelatedPackageName - vulnerabilities[i].Relevancy = vulnerabilityEntry.Relevancy - vulnerabilities[i].Severity = vulnerabilityEntry.Severity - vulnerabilities[i].UrgentCount = vulnerabilityEntry.UrgentCount - } + vulnerabilities := responseObjectToVulnerabilities(scanDetailsResult.Response) resultImageVulnerabilityReport := registryvulnerabilities.ContainerImageVulnerabilityReport{ ImageID: *imageID, diff --git a/registryadaptors/armosec/v1/civarmoadaptor_test.go b/registryadaptors/armosec/v1/civarmoadaptor_test.go index f7d3c6cd..fb13dd6f 100644 --- a/registryadaptors/armosec/v1/civarmoadaptor_test.go +++ b/registryadaptors/armosec/v1/civarmoadaptor_test.go @@ -1,7 +1,6 @@ package v1 import ( - "fmt" "testing" "github.com/armosec/kubescape/registryadaptors/registryvulnerabilities" @@ -9,52 +8,16 @@ import ( ) func TestSum(t *testing.T) { - credentials := make(map[string]string) - credentials["clientId"] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" - credentials["accessKey"] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" - credentials["accountId"] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" - var err error var adaptor registryvulnerabilities.IContainerImageVulnerabilityAdaptor - adaptor, err = NewArmoAdaptorMock("armoui-dev.eudev3.cyberarmorsoft.com", credentials) + adaptor, err = NewArmoAdaptorMock() assert.NoError(t, err) assert.NoError(t, adaptor.Login()) - //fmt.Printf("Login successful: %s\n", adaptor.feToken.Token) imageVulnerabilityReport, err := adaptor.GetImageVulnerability(®istryvulnerabilities.ContainerImageIdentifier{Tag: "gke.gcr.io/gcp-compute-persistent-disk-csi-driver:v1.3.4-gke.0"}) assert.NoError(t, err) - for _, vulnerability := range imageVulnerabilityReport.Vulnerabilities { - fmt.Printf("%s: %s\n", vulnerability.Name, vulnerability.Description) - } + assert.Equal(t, 25, len(imageVulnerabilityReport.Vulnerabilities)) } - -/* - -func TestSum(t *testing.T) { - credentials := make(map[string]string) - credentials["clientId"] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" - credentials["accessKey"] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" - credentials["accountId"] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" - - var err error - var adaptor registryvulnerabilities.IContainerImageVulnerabilityAdaptor - - adaptor, err = NewArmoAdaptorMock("armoui-dev.eudev3.cyberarmorsoft.com", credentials) - assert.NoError(t, err) - - // TODO - create mock - assert.NoError(t, adaptor.Login()) - //fmt.Printf("Login successful: %s\n", adaptor.feToken.Token) - - imageVulnerabilityReport, err := adaptor.GetImageVulnerability(®istryvulnerabilities.ContainerImageIdentifier{Tag: "gke.gcr.io/gcp-compute-persistent-disk-csi-driver:v1.3.4-gke.0"}) - assert.NoError(t, err) - - for _, vulnerability := range imageVulnerabilityReport.Vulnerabilities { - fmt.Printf("%s: %s\n", vulnerability.Name, vulnerability.Description) - } -} - -*/ diff --git a/registryadaptors/armosec/v1/civarmoadaptormock.go b/registryadaptors/armosec/v1/civarmoadaptormock.go index 0ff41001..dac0726d 100644 --- a/registryadaptors/armosec/v1/civarmoadaptormock.go +++ b/registryadaptors/armosec/v1/civarmoadaptormock.go @@ -1,65 +1,48 @@ package v1 import ( - "fmt" + "encoding/json" + "github.com/armosec/kubescape/containerscan" "github.com/armosec/kubescape/registryadaptors/registryvulnerabilities" ) type ArmoCivAdaptorMock struct { - registry string - accountId string - clientId string - accessKey string - feToken FeLoginResponse - armoUrls ArmoBeConfiguration - authCookie string + resultList *registryvulnerabilities.ContainerImageVulnerabilityReport } -func NewArmoAdaptorMock(registry string, credentials map[string]string) (*ArmoCivAdaptorMock, error) { - var accountId string - var accessKey string - var clientId string - var ok bool - if accountId, ok = credentials["accountId"]; !ok { - return nil, fmt.Errorf("define accountId in credentials") +func NewArmoAdaptorMock() (*ArmoCivAdaptorMock, error) { + scanDetailsResult := struct { + Total struct { + Value int `json:"value"` + Relation string `json:"relation"` + } `json:"total"` + Response containerscan.VulnerabilitiesList `json:"response"` + Cursor string `json:"cursor"` + }{} + + if err := json.Unmarshal([]byte(minikubeReponseMock), &scanDetailsResult); err != nil { + return nil, err } - if clientId, ok = credentials["clientId"]; !ok { - return nil, fmt.Errorf("define clientId in credentials") + + vulnerabilities := responseObjectToVulnerabilities(scanDetailsResult.Response) + + resultImageVulnerabilityReport := registryvulnerabilities.ContainerImageVulnerabilityReport{ + ImageID: registryvulnerabilities.ContainerImageIdentifier{Tag: vulnerabilities[0].Name}, + Vulnerabilities: vulnerabilities, } - if accessKey, ok = credentials["accessKey"]; !ok { - return nil, fmt.Errorf("define accessKey in credentials") - } - armoCivAdaptor := ArmoCivAdaptorMock{ - registry: registry, - accountId: accountId, - clientId: clientId, - accessKey: accessKey, - } - // err := armoCivAdaptorMock.initializeUrls() - // if err != nil { - // return nil, err - // } - return &armoCivAdaptor, nil + return &ArmoCivAdaptorMock{resultList: &resultImageVulnerabilityReport}, nil } func (armoCivAdaptorMock *ArmoCivAdaptorMock) Login() error { - return nil } func (armoCivAdaptorMock *ArmoCivAdaptorMock) GetImagesVulnerabilities(imageIDs []registryvulnerabilities.ContainerImageIdentifier) ([]registryvulnerabilities.ContainerImageVulnerabilityReport, error) { - resultList := make([]registryvulnerabilities.ContainerImageVulnerabilityReport, 0) - for _, imageID := range imageIDs { - result, err := armoCivAdaptorMock.GetImageVulnerability(&imageID) - if err == nil { - resultList = append(resultList, *result) - } - } - return resultList, nil + return []registryvulnerabilities.ContainerImageVulnerabilityReport{*armoCivAdaptorMock.resultList}, nil } func (armoCivAdaptorMock *ArmoCivAdaptorMock) GetImageVulnerability(imageID *registryvulnerabilities.ContainerImageIdentifier) (*registryvulnerabilities.ContainerImageVulnerabilityReport, error) { - return ®istryvulnerabilities.ContainerImageVulnerabilityReport{}, nil + return armoCivAdaptorMock.resultList, nil } func (armoCivAdaptorMock *ArmoCivAdaptorMock) DescribeAdaptor() string { @@ -76,3 +59,9 @@ func (armoCivAdaptorMock *ArmoCivAdaptorMock) GetImagesScanStatus(imageIDs []reg // TODO return []registryvulnerabilities.ContainerImageScanStatus{}, nil } + +//============================================================================================================================== +//============================================================================================================================== +//============================================================================================================================== + +var minikubeReponseMock = `{"total":{"value":73,"relation":"eq"},"response":[{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2005-2541","https://security-tracker.debian.org/tracker/CVE-2005-2541"],"name":"CVE-2005-2541","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"tar","packageVersion":"1.30+dfsg-6","link":"https://nvd.nist.gov/vuln/detail/CVE-2005-2541","description":"Tar 1.15.1 does not properly warn the user when extracting setuid or setgid files, which may allow local users or remote attackers to gain privileges.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2007-5686","https://security-tracker.debian.org/tracker/CVE-2007-5686"],"name":"CVE-2007-5686","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"login","packageVersion":"1:4.5-1.1","link":"https://nvd.nist.gov/vuln/detail/CVE-2007-5686","description":"initscripts in rPath Linux 1 sets insecure permissions for the /var/log/btmp file, which allows local users to obtain sensitive information regarding authentication attempts. NOTE: because sshd detects the insecure permissions and does not log certain events, this also prevents sshd from logging failed authentication attempts by remote attackers.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2007-6755","https://security-tracker.debian.org/tracker/CVE-2007-6755"],"name":"CVE-2007-6755","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libssl1.1","packageVersion":"1.1.1d-0+deb10u6","link":"https://nvd.nist.gov/vuln/detail/CVE-2007-6755","description":"The NIST SP 800-90A default statement of the Dual Elliptic Curve Deterministic Random Bit Generation (Dual_EC_DRBG) algorithm contains point Q constants with a possible relationship to certain \"skeleton key\" values, which might allow context-dependent attackers to defeat cryptographic protection mechanisms by leveraging knowledge of those values. NOTE: this is a preliminary CVE for Dual_EC_DRBG; future research may provide additional details about point Q and associated attacks, and could potentially lead to a RECAST or REJECT of this CVE.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2010-0928","https://security-tracker.debian.org/tracker/CVE-2010-0928"],"name":"CVE-2010-0928","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libssl1.1","packageVersion":"1.1.1d-0+deb10u6","link":"https://nvd.nist.gov/vuln/detail/CVE-2010-0928","description":"OpenSSL 0.9.8i on the Gaisler Research LEON3 SoC on the Xilinx Virtex-II Pro FPGA uses a Fixed Width Exponentiation (FWE) algorithm for certain signature calculations, and does not verify the signature before providing it to a caller, which makes it easier for physically proximate attackers to determine the private key via a modified supply voltage for the microprocessor, related to a \"fault-based attack.\"","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2010-4756","https://security-tracker.debian.org/tracker/CVE-2010-4756"],"name":"CVE-2010-4756","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libc-bin","packageVersion":"2.28-10","link":"https://nvd.nist.gov/vuln/detail/CVE-2010-4756","description":"The glob implementation in the GNU C Library (aka glibc or libc6) allows remote authenticated users to cause a denial of service (CPU and memory consumption) via crafted glob expressions that do not match any pathnames, as demonstrated by glob expressions in STAT commands to an FTP daemon, a different vulnerability than CVE-2010-2632.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2011-3374","https://security-tracker.debian.org/tracker/CVE-2011-3374"],"name":"CVE-2011-3374","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"apt","packageVersion":"1.8.2.3","link":"https://nvd.nist.gov/vuln/detail/CVE-2011-3374","description":"It was found that apt-key in apt, all versions, do not correctly validate gpg keys with the master keyring, leading to a potential man-in-the-middle attack.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2011-3389","https://security-tracker.debian.org/tracker/CVE-2011-3389"],"name":"CVE-2011-3389","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libgnutls30","packageVersion":"3.6.7-4+deb10u7","link":"https://nvd.nist.gov/vuln/detail/CVE-2011-3389","description":"The SSL protocol, as used in certain configurations in Microsoft Windows and Microsoft Internet Explorer, Mozilla Firefox, Google Chrome, Opera, and other products, encrypts data by using CBC mode with chained initialization vectors, which allows man-in-the-middle attackers to obtain plaintext HTTP headers via a blockwise chosen-boundary attack (BCBA) on an HTTPS session, in conjunction with JavaScript code that uses (1) the HTML5 WebSocket API, (2) the Java URLConnection API, or (3) the Silverlight WebClient API, aka a \"BEAST\" attack.","severity":"Medium","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2011-4116","https://security-tracker.debian.org/tracker/CVE-2011-4116"],"name":"CVE-2011-4116","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"perl-base","packageVersion":"5.28.1-6+deb10u1","link":"https://nvd.nist.gov/vuln/detail/CVE-2011-4116","description":"_is_safe in the File::Temp module for Perl does not properly handle symlinks.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2012-2663","https://security-tracker.debian.org/tracker/CVE-2012-2663"],"name":"CVE-2012-2663","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"iptables","packageVersion":"1.8.5-3~bpo10+1","link":"https://nvd.nist.gov/vuln/detail/CVE-2012-2663","description":"extensions/libxt_tcp.c in iptables through 1.4.21 does not match TCP SYN+FIN packets in --syn rules, which might allow remote attackers to bypass intended firewall restrictions via crafted packets. NOTE: the CVE-2012-6638 fix makes this issue less relevant.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2013-4235","https://security-tracker.debian.org/tracker/CVE-2013-4235"],"name":"CVE-2013-4235","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"login","packageVersion":"1:4.5-1.1","link":"https://nvd.nist.gov/vuln/detail/CVE-2013-4235","description":"shadow: TOCTOU (time-of-check time-of-use) race condition when copying and removing directory trees","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2013-4392","https://security-tracker.debian.org/tracker/CVE-2013-4392"],"name":"CVE-2013-4392","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libsystemd0","packageVersion":"241-7~deb10u7","link":"https://nvd.nist.gov/vuln/detail/CVE-2013-4392","description":"systemd, when updating file permissions, allows local users to change the permissions and SELinux security contexts for arbitrary files via a symlink attack on unspecified files.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2016-10228","https://security-tracker.debian.org/tracker/CVE-2016-10228"],"name":"CVE-2016-10228","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libc-bin","packageVersion":"2.28-10","link":"https://nvd.nist.gov/vuln/detail/CVE-2016-10228","description":"The iconv program in the GNU C Library (aka glibc or libc6) 2.31 and earlier, when invoked with multiple suffixes in the destination encoding (TRANSLATE or IGNORE) along with the -c option, enters an infinite loop when processing invalid multi-byte input sequences, leading to a denial of service.","severity":"Low","metadata":null,"fixedIn":[{"name":"wont-fix","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2016-2781","https://security-tracker.debian.org/tracker/CVE-2016-2781"],"name":"CVE-2016-2781","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"coreutils","packageVersion":"8.30-3","link":"https://nvd.nist.gov/vuln/detail/CVE-2016-2781","description":"chroot in GNU coreutils, when used with --userspec, allows local users to escape to the parent session via a crafted TIOCSTI ioctl call, which pushes characters to the terminal's input buffer.","severity":"Low","metadata":null,"fixedIn":[{"name":"wont-fix","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2017-11164","https://security-tracker.debian.org/tracker/CVE-2017-11164"],"name":"CVE-2017-11164","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libpcre3","packageVersion":"2:8.39-12","link":"https://nvd.nist.gov/vuln/detail/CVE-2017-11164","description":"In PCRE 8.41, the OP_KETRMAX feature in the match function in pcre_exec.c allows stack exhaustion (uncontrolled recursion) when processing a crafted regular expression.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2017-16231","https://security-tracker.debian.org/tracker/CVE-2017-16231"],"name":"CVE-2017-16231","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libpcre3","packageVersion":"2:8.39-12","link":"https://nvd.nist.gov/vuln/detail/CVE-2017-16231","description":"** DISPUTED ** In PCRE 8.41, after compiling, a pcretest load test PoC produces a crash overflow in the function match() in pcre_exec.c because of a self-recursive call. NOTE: third parties dispute the relevance of this report, noting that there are options that can be used to limit the amount of stack that is used.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2017-18018","https://security-tracker.debian.org/tracker/CVE-2017-18018"],"name":"CVE-2017-18018","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"coreutils","packageVersion":"8.30-3","link":"https://nvd.nist.gov/vuln/detail/CVE-2017-18018","description":"In GNU Coreutils through 8.29, chown-core.c in chown and chgrp does not prevent replacement of a plain file with a symlink during use of the POSIX \"-R -L\" options, which allows local users to modify the ownership of arbitrary files by leveraging a race condition.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2017-7245","https://security-tracker.debian.org/tracker/CVE-2017-7245"],"name":"CVE-2017-7245","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libpcre3","packageVersion":"2:8.39-12","link":"https://nvd.nist.gov/vuln/detail/CVE-2017-7245","description":"Stack-based buffer overflow in the pcre32_copy_substring function in pcre_get.c in libpcre1 in PCRE 8.40 allows remote attackers to cause a denial of service (WRITE of size 4) or possibly have unspecified other impact via a crafted file.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2017-7246","https://security-tracker.debian.org/tracker/CVE-2017-7246"],"name":"CVE-2017-7246","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libpcre3","packageVersion":"2:8.39-12","link":"https://nvd.nist.gov/vuln/detail/CVE-2017-7246","description":"Stack-based buffer overflow in the pcre32_copy_substring function in pcre_get.c in libpcre1 in PCRE 8.40 allows remote attackers to cause a denial of service (WRITE of size 268) or possibly have unspecified other impact via a crafted file.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2018-1000654","https://security-tracker.debian.org/tracker/CVE-2018-1000654"],"name":"CVE-2018-1000654","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libtasn1-6","packageVersion":"4.13-3","link":"https://nvd.nist.gov/vuln/detail/CVE-2018-1000654","description":"GNU Libtasn1-4.13 libtasn1-4.13 version libtasn1-4.13, libtasn1-4.12 contains a DoS, specifically CPU usage will reach 100% when running asn1Paser against the POC due to an issue in _asn1_expand_object_id(p_tree), after a long time, the program will be killed. This attack appears to be exploitable via parsing a crafted file.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2018-12886","https://security-tracker.debian.org/tracker/CVE-2018-12886"],"name":"CVE-2018-12886","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"gcc-8-base","packageVersion":"8.3.0-6","link":"https://nvd.nist.gov/vuln/detail/CVE-2018-12886","description":"stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler Collection (GCC) 4.1 through 8 (under certain circumstances) generate instruction sequences when targeting ARM targets that spill the address of the stack protector guard, which allows an attacker to bypass the protection of -fstack-protector, -fstack-protector-all, -fstack-protector-strong, and -fstack-protector-explicit against stack overflow by controlling what the stack canary is compared against.","severity":"High","metadata":null,"fixedIn":[{"name":"wont-fix","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2018-20796","https://security-tracker.debian.org/tracker/CVE-2018-20796"],"name":"CVE-2018-20796","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libc-bin","packageVersion":"2.28-10","link":"https://nvd.nist.gov/vuln/detail/CVE-2018-20796","description":"In the GNU C Library (aka glibc or libc6) through 2.29, check_dst_limits_calc_pos_1 in posix/regexec.c has Uncontrolled Recursion, as demonstrated by '(\\227|)(\\\\1\\\\1|t1|\\\\\\2537)+' in grep.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2018-6829","https://security-tracker.debian.org/tracker/CVE-2018-6829"],"name":"CVE-2018-6829","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libgcrypt20","packageVersion":"1.8.4-5+deb10u1","link":"https://nvd.nist.gov/vuln/detail/CVE-2018-6829","description":"cipher/elgamal.c in Libgcrypt through 1.8.2, when used to encrypt messages directly, improperly encodes plaintexts, which allows attackers to obtain sensitive information by reading ciphertext data (i.e., it does not have semantic security in face of a ciphertext-only attack). The Decisional Diffie-Hellman (DDH) assumption does not hold for Libgcrypt's ElGamal implementation.","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2018-7169","https://security-tracker.debian.org/tracker/CVE-2018-7169"],"name":"CVE-2018-7169","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"login","packageVersion":"1:4.5-1.1","link":"https://nvd.nist.gov/vuln/detail/CVE-2018-7169","description":"An issue was discovered in shadow 4.5. newgidmap (in shadow-utils) is setuid and allows an unprivileged user to be placed in a user namespace where setgroups(2) is permitted. This allows an attacker to remove themselves from a supplementary group, which may allow access to certain filesystem paths if the administrator has used \"group blacklisting\" (e.g., chmod g-rwx) to restrict access to paths. This flaw effectively reverts a security feature in the kernel (in particular, the /proc/self/setgroups knob) to prevent this sort of privilege escalation.","severity":"Low","metadata":null,"fixedIn":[{"name":"wont-fix","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2019-1010022","https://security-tracker.debian.org/tracker/CVE-2019-1010022"],"name":"CVE-2019-1010022","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libc-bin","packageVersion":"2.28-10","link":"https://nvd.nist.gov/vuln/detail/CVE-2019-1010022","description":"** DISPUTED ** GNU Libc current is affected by: Mitigation bypass. The impact is: Attacker may bypass stack guard protection. The component is: nptl. The attack vector is: Exploit stack buffer overflow vulnerability and use this bypass vulnerability to bypass stack guard. NOTE: Upstream comments indicate \"this is being treated as a non-security bug and no real threat.\"","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}},{"designators":{"designatorType":"Attributes","attributes":{"cluster":"minikube","containerName":"kube-proxy","customerGUID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","kind":"daemonset","name":"kube-proxy","namespace":"kube-system"}},"context":[{"attribute":"customerGUID","value":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","source":"designators.attributes"},{"attribute":"cluster","value":"minikube","source":"designators.attributes"},{"attribute":"namespace","value":"kube-system","source":"designators.attributes"},{"attribute":"kind","value":"daemonset","source":"designators.attributes"},{"attribute":"name","value":"kube-proxy","source":"designators.attributes"},{"attribute":"containerName","value":"kube-proxy","source":"designators.attributes"}],"wlid":"wlid://cluster-minikube/namespace-kube-system/daemonset-kube-proxy","containersScanID":"XXXXXXXXXXXXXXXXXX","layers":[{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""},{"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","parentLayerHash":""}],"timestamp":1643522422,"isFixed":0,"layerHash":"sha256:48b90c7688a2c85d7081a437ecba5cb706fbaa98b09def0b206dbbe39e3af558","links":["https://nvd.nist.gov/vuln/detail/CVE-2019-1010023","https://security-tracker.debian.org/tracker/CVE-2019-1010023"],"name":"CVE-2019-1010023","imageHash":"sha256:132b7fc61d18b3ec4a35348f6c915b429f4757d92196e2ea8cd937aea3db41df","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","packageName":"libc-bin","packageVersion":"2.28-10","link":"https://nvd.nist.gov/vuln/detail/CVE-2019-1010023","description":"** DISPUTED ** GNU Libc current is affected by: Re-mapping current loaded library with malicious ELF file. The impact is: In worst case attacker may evaluate privileges. The component is: libld. The attack vector is: Attacker sends 2 ELF files to victim and asks to run ldd on it. ldd execute code. NOTE: Upstream comments indicate \"this is being treated as a non-security bug and no real threat.\"","severity":"Negligible","metadata":null,"fixedIn":[{"name":"not-fixed","imageTag":"k8s.gcr.io/kube-proxy@sha256:561d6cb95c32333db13ea847396167e903d97cf6e08dd937906c3dd0108580b7","version":""}],"relevant":"No signature profile to compare","urgent":0,"neglected":0,"healthStatus":"","categories":{"isRce":false}}],"cursor":""}` diff --git a/registryadaptors/armosec/v1/civarmoadaptorutils.go b/registryadaptors/armosec/v1/civarmoadaptorutils.go index 12ba6048..b019ed5b 100644 --- a/registryadaptors/armosec/v1/civarmoadaptorutils.go +++ b/registryadaptors/armosec/v1/civarmoadaptorutils.go @@ -35,7 +35,7 @@ func (armoCivAdaptor *ArmoCivAdaptor) initializeUrls() error { } func (armoCivAdaptor *ArmoCivAdaptor) getAuthCookie() (string, error) { - selectCustomer := ArmoSelectCustomer{SelectedCustomerGuid: armoCivAdaptor.accountId} + selectCustomer := ArmoSelectCustomer{SelectedCustomerGuid: armoCivAdaptor.accountID} requestBody, _ := json.Marshal(selectCustomer) requestUrl := fmt.Sprintf("%s/api/v1/openid_customers", armoCivAdaptor.armoUrls.BackendUrl) client := &http.Client{} @@ -75,14 +75,18 @@ func (armoCivAdaptor *ArmoCivAdaptor) getAuthCookie() (string, error) { } func (armoCivAdaptor *ArmoCivAdaptor) getImageLastScanId(imageID *registryvulnerabilities.ContainerImageIdentifier) (string, error) { - filter := []map[string]string{{"imageTag": imageID.Tag}} + filter := []map[string]string{{"imageTag": imageID.Tag, "status": "Success"}} pageSize := 1 pageNumber := 1 request := V2ListRequest{PageSize: &pageSize, PageNum: &pageNumber, InnerFilters: filter, OrderBy: "timestamp:desc"} requestBody, _ := json.Marshal(request) - requestUrl := fmt.Sprintf("%s/api/v1/vulnerability/scanResultsSumSummary?customerGUID=%s", armoCivAdaptor.armoUrls.BackendUrl, armoCivAdaptor.accountId) + requestUrl := fmt.Sprintf("%s/api/v1/vulnerability/scanResultsSumSummary?customerGUID=%s", armoCivAdaptor.armoUrls.BackendUrl, armoCivAdaptor.accountID) client := &http.Client{} httpRequest, err := http.NewRequest("POST", requestUrl, bytes.NewBuffer(requestBody)) + if err != nil { + return "", err + } + httpRequest.Header.Set("Content-Type", "application/json") httpRequest.Header.Set("Authorization", fmt.Sprintf("Bearer %s", armoCivAdaptor.feToken.Token)) httpRequest.Header.Set("Cookie", fmt.Sprintf("auth=%s", armoCivAdaptor.authCookie)) @@ -120,3 +124,26 @@ func (armoCivAdaptor *ArmoCivAdaptor) getImageLastScanId(imageID *registryvulner return scanSummartResult.Response[0].ContainerScanID, nil } + +func responseObjectToVulnerabilities(vulnerabilitiesList containerscan.VulnerabilitiesList) []registryvulnerabilities.Vulnerability { + vulnerabilities := make([]registryvulnerabilities.Vulnerability, len(vulnerabilitiesList)) + for i, vulnerabilityEntry := range vulnerabilitiesList { + vulnerabilities[i].Description = vulnerabilityEntry.Description + vulnerabilities[i].Fixes = make([]registryvulnerabilities.FixedIn, len(vulnerabilityEntry.Fixes)) + for j, fix := range vulnerabilityEntry.Fixes { + vulnerabilities[i].Fixes[j].ImgTag = fix.ImgTag + vulnerabilities[i].Fixes[j].Name = fix.Name + vulnerabilities[i].Fixes[j].Version = fix.Version + } + vulnerabilities[i].HealthStatus = vulnerabilityEntry.HealthStatus + vulnerabilities[i].Link = vulnerabilityEntry.Link + vulnerabilities[i].Metadata = vulnerabilityEntry.Metadata + vulnerabilities[i].Name = vulnerabilityEntry.Name + vulnerabilities[i].PackageVersion = vulnerabilityEntry.PackageVersion + vulnerabilities[i].RelatedPackageName = vulnerabilityEntry.RelatedPackageName + vulnerabilities[i].Relevancy = vulnerabilityEntry.Relevancy + vulnerabilities[i].Severity = vulnerabilityEntry.Severity + vulnerabilities[i].UrgentCount = vulnerabilityEntry.UrgentCount + } + return vulnerabilities +} diff --git a/registryadaptors/armosec/v1/datastructures.go b/registryadaptors/armosec/v1/datastructures.go index 0ccc492f..79ab8f5c 100644 --- a/registryadaptors/armosec/v1/datastructures.go +++ b/registryadaptors/armosec/v1/datastructures.go @@ -49,8 +49,8 @@ type ArmoSelectCustomer struct { type ArmoCivAdaptor struct { registry string - accountId string - clientId string + accountID string + clientID string accessKey string feToken FeLoginResponse armoUrls ArmoBeConfiguration diff --git a/resourcehandler/filesloader.go b/resourcehandler/filesloader.go index c4052fe2..86fe4434 100644 --- a/resourcehandler/filesloader.go +++ b/resourcehandler/filesloader.go @@ -34,13 +34,15 @@ const ( // FileResourceHandler handle resources from files and URLs type FileResourceHandler struct { - inputPatterns []string + inputPatterns []string + registryAdaptors *RegistryAdaptors } -func NewFileResourceHandler(inputPatterns []string) *FileResourceHandler { +func NewFileResourceHandler(inputPatterns []string, registryAdaptors *RegistryAdaptors) *FileResourceHandler { k8sinterface.InitializeMapResourcesMock() // initialize the resource map return &FileResourceHandler{ - inputPatterns: inputPatterns, + inputPatterns: inputPatterns, + registryAdaptors: registryAdaptors, } } @@ -90,6 +92,10 @@ func (fileHandler *FileResourceHandler) GetResources(frameworks []reporthandling } } + if err := fileHandler.registryAdaptors.collectImagesVulnerabilities(k8sResources, allResources); err != nil { + cautils.WarningDisplay(os.Stderr, "Warning: failed to collect images vulnerabilities: %s\n", err.Error()) + } + return k8sResources, allResources, nil } diff --git a/resourcehandler/k8sresources.go b/resourcehandler/k8sresources.go index 6a21f1fd..7198613c 100644 --- a/resourcehandler/k8sresources.go +++ b/resourcehandler/k8sresources.go @@ -30,14 +30,16 @@ type K8sResourceHandler struct { hostSensorHandler hostsensorutils.IHostSensor fieldSelector IFieldSelector rbacObjectsAPI *cautils.RBACObjects + registryAdaptors *RegistryAdaptors } -func NewK8sResourceHandler(k8s *k8sinterface.KubernetesApi, fieldSelector IFieldSelector, hostSensorHandler hostsensorutils.IHostSensor, rbacObjects *cautils.RBACObjects) *K8sResourceHandler { +func NewK8sResourceHandler(k8s *k8sinterface.KubernetesApi, fieldSelector IFieldSelector, hostSensorHandler hostsensorutils.IHostSensor, rbacObjects *cautils.RBACObjects, registryAdaptors *RegistryAdaptors) *K8sResourceHandler { return &K8sResourceHandler{ k8s: k8s, fieldSelector: fieldSelector, hostSensorHandler: hostSensorHandler, rbacObjectsAPI: rbacObjects, + registryAdaptors: registryAdaptors, } } @@ -60,6 +62,11 @@ func (k8sHandler *K8sResourceHandler) GetResources(frameworks []reporthandling.F if err := k8sHandler.pullResources(k8sResourcesMap, allResources, namespace, labels); err != nil { return k8sResourcesMap, allResources, err } + + if err := k8sHandler.registryAdaptors.collectImagesVulnerabilities(k8sResourcesMap, allResources); err != nil { + cautils.WarningDisplay(os.Stderr, "Warning: failed to collect image vulnerabilities: %s\n", err.Error()) + } + if err := k8sHandler.collectHostResources(allResources, k8sResourcesMap); err != nil { cautils.WarningDisplay(os.Stderr, "Warning: failed to collect host sensor resources\n") } diff --git a/resourcehandler/registrydata.go b/resourcehandler/registrydata.go new file mode 100644 index 00000000..65df1165 --- /dev/null +++ b/resourcehandler/registrydata.go @@ -0,0 +1,147 @@ +package resourcehandler + +import ( + "github.com/armosec/k8s-interface/k8sinterface" + "github.com/armosec/k8s-interface/workloadinterface" + "github.com/armosec/kubescape/cautils" + armosecadaptorv1 "github.com/armosec/kubescape/registryadaptors/armosec/v1" + "github.com/armosec/kubescape/registryadaptors/registryvulnerabilities" + "github.com/armosec/opa-utils/shared" +) + +const ( + ImagevulnerabilitiesObjectGroup = "image.vulnscan.com" + ImagevulnerabilitiesObjectVersion = "v1" + ImagevulnerabilitiesObjectKind = "ImageVulnerabilities" +) + +type RegistryAdaptors struct { + adaptors []registryvulnerabilities.IContainerImageVulnerabilityAdaptor +} + +func NewRegistryAdaptors() (*RegistryAdaptors, error) { + // list supported adaptors + registryAdaptors := &RegistryAdaptors{} + adaptors, err := listAdaptores() + if err != nil { + return registryAdaptors, err + } + registryAdaptors.adaptors = adaptors + return registryAdaptors, nil +} + +func (registryAdaptors *RegistryAdaptors) collectImagesVulnerabilities(k8sResourcesMap *cautils.K8SResources, allResources map[string]workloadinterface.IMetadata) error { + + // list cluster images + images := listImagesTags(k8sResourcesMap, allResources) + imagesIdentifiers := imageTagsToContainerImageIdentifier(images) + + imagesVulnerability := map[string][]registryvulnerabilities.Vulnerability{} + for i := range registryAdaptors.adaptors { // login and and get vulnerabilities + + if err := registryAdaptors.adaptors[i].Login(); err != nil { + return err + } + vulnerabilities, err := registryAdaptors.adaptors[i].GetImagesVulnerabilities(imagesIdentifiers) + if err != nil { + return err + } + for j := range vulnerabilities { + imagesVulnerability[vulnerabilities[j].ImageID.Tag] = vulnerabilities[j].Vulnerabilities + } + } + + // convert result to IMetadata object + metaObjs := vulnerabilitiesToIMetadata(imagesVulnerability) + + // save in resources map + for i := range metaObjs { + allResources[metaObjs[i].GetID()] = metaObjs[i] + } + (*k8sResourcesMap)[k8sinterface.JoinResourceTriplets(ImagevulnerabilitiesObjectGroup, ImagevulnerabilitiesObjectVersion, ImagevulnerabilitiesObjectKind)] = workloadinterface.ListMetaIDs(metaObjs) + + return nil +} + +func vulnerabilitiesToIMetadata(vulnerabilities map[string][]registryvulnerabilities.Vulnerability) []workloadinterface.IMetadata { + objs := []workloadinterface.IMetadata{} + for i := range vulnerabilities { + objs = append(objs, vulnerabilityToIMetadata(i, vulnerabilities[i])) + } + return objs +} + +func vulnerabilityToIMetadata(imageTag string, vulnerabilities []registryvulnerabilities.Vulnerability) workloadinterface.IMetadata { + obj := map[string]interface{}{} + metadata := map[string]interface{}{} + metadata["name"] = imageTag // store image tag as object name + obj["kind"] = ImagevulnerabilitiesObjectKind + obj["apiVersion"] = k8sinterface.JoinGroupVersion(ImagevulnerabilitiesObjectGroup, ImagevulnerabilitiesObjectVersion) + obj["data"] = vulnerabilities + obj["metadata"] = metadata + + return workloadinterface.NewWorkloadObj(obj) +} + +// list all images tags +func listImagesTags(k8sResourcesMap *cautils.K8SResources, allResources map[string]workloadinterface.IMetadata) []string { + images := []string{} + for _, resources := range *k8sResourcesMap { + for j := range resources { + if resource, ok := allResources[resources[j]]; ok { + if resource.GetObjectType() == workloadinterface.TypeWorkloadObject { + workload := workloadinterface.NewWorkloadObj(resource.GetObject()) + if contianers, err := workload.GetContainers(); err == nil { + for i := range contianers { + images = append(images, contianers[i].Image) + } + } + if contianers, err := workload.GetInitContainers(); err == nil { + for i := range contianers { + images = append(images, contianers[i].Image) + } + } + } + } + } + } + + return shared.SliceStringToUnique(images) +} + +func imageTagsToContainerImageIdentifier(images []string) []registryvulnerabilities.ContainerImageIdentifier { + imagesIdentifiers := make([]registryvulnerabilities.ContainerImageIdentifier, len(images)) + for i := range images { + imageIdentifier := registryvulnerabilities.ContainerImageIdentifier{ + Tag: images[i], + } + // splitted := strings.Split(images[i], "/") + // if len(splitted) == 1 { + // imageIdentifier.Tag = splitted[0] + // } else if len(splitted) == 2 { + // imageIdentifier.Registry = splitted[0] + // imageIdentifier.Tag = splitted[1] + // } else if len(splitted) >= 3 { + // imageIdentifier.Registry = splitted[0] + // imageIdentifier.Repository = strings.Join(splitted[1:len(splitted)-1], "/") + // imageIdentifier.Tag = splitted[len(splitted)-1] + // } + imagesIdentifiers[i] = imageIdentifier + } + return imagesIdentifiers +} +func listAdaptores() ([]registryvulnerabilities.IContainerImageVulnerabilityAdaptor, error) { + customerGUID := " " + clientID := " " + accessKey := " " + registry := "armoui-dev.eudev3.cyberarmorsoft.com" + + adaptors := []registryvulnerabilities.IContainerImageVulnerabilityAdaptor{} + armosecAdaptor, err := armosecadaptorv1.NewArmoAdaptor(registry, map[string]string{"accountID": customerGUID, "clientID": clientID, "accessKey": accessKey}) + if err != nil { + return nil, err + } + + adaptors = append(adaptors, armosecAdaptor) + return adaptors, nil +}