cloud-native-security-inspector icon indicating copy to clipboard operation
cloud-native-security-inspector copied to clipboard

CNSI is not capturing Workload of kind cronJob.

Open bgubbala opened this issue 1 year ago • 3 comments

Environment Platform: Kubernetes Kubernetes/Platform Version(s):

Describe the bug During the Governor exporter found that CNSI is not capturing the Workload of kind cronJob. Instead, it is listing each job of cronJob as a separate Workload of kind Job. There was no grouping of containers under a single workload of kind CronJob.

To Reproduce Steps to reproduce the behavior:

  1. Create a cronJob
  2. check the workloads of the cnsi agent.

Expected behavior and actual behavior: There has to be a grouping of Job containers of cronJob as a single workload of kind CronJob.

bgubbala avatar Mar 07 '23 04:03 bgubbala

Currently, the workload in the scanning reports is a struct like this: https://github.com/vmware-tanzu/cloud-native-security-inspector/blob/6dd414d0f11330808280ae6df6914495491c9f32/src/api/v1alpha1/workload.go#L39

The pods in Cronjob have been captured but not grouped by the CronJob kind, right?

4everming avatar Mar 08 '23 03:03 4everming

yes

bgubbala avatar Mar 08 '23 04:03 bgubbala

yes

As we discussed, probably we can organize the workload struct as we need in the new kind of inspector which is designed for collecting and sending the telemetry to VAC.

4everming avatar Mar 08 '23 05:03 4everming