mirror of
https://github.com/kubescape/kubescape.git
synced 2026-02-14 18:09:55 +00:00
Fix: properly handle nil downloadReleasedPolicy in getters
Ensure getter functions handle nil downloadReleasedPolicy correctly by creating a new instance when needed, maintaining backward compatibility with existing code while supporting air-gapped mode. Co-authored-by: matthyx <20683409+matthyx@users.noreply.github.com>
This commit is contained in:
@@ -91,8 +91,9 @@ func getResourceHandler(ctx context.Context, scanInfo *cautils.ScanInfo, tenantC
|
||||
}
|
||||
|
||||
// Only initialize cloud connector if not in air-gapped mode
|
||||
// This call initializes the global cloud API connector for later use
|
||||
if !isAirGappedMode(scanInfo) {
|
||||
getter.GetKSCloudAPIConnector()
|
||||
_ = getter.GetKSCloudAPIConnector()
|
||||
}
|
||||
rbacObjects := getRBACHandler(tenantConfig, k8s, scanInfo.Submit)
|
||||
return resourcehandler.NewK8sResourceHandler(k8s, hostSensorHandler, rbacObjects, tenantConfig.GetContextName())
|
||||
|
||||
Reference in New Issue
Block a user