nccgroup / ScoutSuite

Multi-Cloud Security Auditing Tool
GNU General Public License v2.0
6.74k stars 1.07k forks source link

`__main__.py L257: Initialization failure: 'items'` when trying to scan an OpenShift cluster. #1662

Open jgirlich-iteratec opened 2 months ago

jgirlich-iteratec commented 2 months ago

I tried scanning a Kubernetes cluster on an OpenShift system, but ScoutSuite fails with __main__.py L257: Initialization failure: 'items'.

% oc version
Client Version: 4.15.0-0.okd-2024-03-10-010116
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: 4.14.34
Kubernetes Version: v1.27.15+6147456
% scout --version
Scout Suite 5.14.0

No JSON output is generated.

To Reproduce

% oc login --server=https://[redacted]:6443 --web
% scout kubernetes --debug
2024-08-26 17:59:03 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO Launching Scout
2024-08-26 17:59:03 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO Authenticating to cloud provider
2024-08-26 17:59:03 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /version
2024-08-26 17:59:03 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api
2024-08-26 17:59:04 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1
2024-08-26 17:59:04 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/componentstatuses
2024-08-26 17:59:04 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/configmaps
2024-08-26 17:59:08 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/endpoints
2024-08-26 17:59:08 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/events
2024-08-26 17:59:09 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/limitranges
2024-08-26 17:59:09 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/namespaces
2024-08-26 17:59:10 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/nodes
2024-08-26 17:59:10 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/persistentvolumeclaims
2024-08-26 17:59:10 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/persistentvolumes
2024-08-26 17:59:10 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/pods
2024-08-26 17:59:13 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/podtemplates
2024-08-26 17:59:13 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/replicationcontrollers
2024-08-26 17:59:13 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/resourcequotas
2024-08-26 17:59:13 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/secrets
2024-08-26 17:59:13 jan-Standard-PC-Q35-ICH9-2009 scout[7516] ERROR Failed to get /api/v1/secrets
2024-08-26 17:59:13 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/serviceaccounts
2024-08-26 17:59:13 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /api/v1/services
2024-08-26 18:00:07 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis
2024-08-26 18:00:07 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apiregistration.k8s.io/v1
2024-08-26 18:00:07 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apiregistration.k8s.io/v1/apiservices
2024-08-26 18:00:07 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apiregistration.k8s.io/v1/apiservices
2024-08-26 18:00:07 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps/v1
2024-08-26 18:00:07 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps/v1/controllerrevisions
2024-08-26 18:00:07 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps/v1/controllerrevisions
2024-08-26 18:00:07 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps/v1/daemonsets
2024-08-26 18:00:07 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps/v1/daemonsets
2024-08-26 18:00:08 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps/v1/deployments
2024-08-26 18:00:08 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps/v1/deployments
2024-08-26 18:00:08 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps/v1/replicasets
2024-08-26 18:00:10 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps/v1/replicasets
2024-08-26 18:00:12 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps/v1/statefulsets
2024-08-26 18:00:13 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps/v1/statefulsets
2024-08-26 18:00:13 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/events.k8s.io/v1
2024-08-26 18:00:13 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/events.k8s.io/v1/events
2024-08-26 18:00:14 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/events.k8s.io/v1/events
2024-08-26 18:00:16 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authentication.k8s.io/v1
2024-08-26 18:00:16 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authorization.k8s.io/v1
2024-08-26 18:00:16 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/autoscaling/v2
2024-08-26 18:00:16 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/autoscaling/v2/horizontalpodautoscalers
2024-08-26 18:00:16 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/autoscaling/v2/horizontalpodautoscalers
2024-08-26 18:00:16 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/autoscaling/v1
2024-08-26 18:00:16 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/autoscaling/v1/horizontalpodautoscalers
2024-08-26 18:00:16 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/autoscaling/v1/horizontalpodautoscalers
2024-08-26 18:00:16 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/batch/v1
2024-08-26 18:00:16 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/batch/v1/cronjobs
2024-08-26 18:00:16 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/batch/v1/cronjobs
2024-08-26 18:00:16 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/batch/v1/jobs
2024-08-26 18:00:17 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/batch/v1/jobs
2024-08-26 18:00:18 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/certificates.k8s.io/v1
2024-08-26 18:00:18 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/certificates.k8s.io/v1/certificatesigningrequests
2024-08-26 18:00:18 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/certificates.k8s.io/v1/certificatesigningrequests
2024-08-26 18:00:18 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/networking.k8s.io/v1
2024-08-26 18:00:18 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/networking.k8s.io/v1/ingressclasses
2024-08-26 18:00:18 jan-Standard-PC-Q35-ICH9-2009 scout[7516] ERROR Failed to get /apis/networking.k8s.io/v1/ingressclasses
2024-08-26 18:00:18 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/networking.k8s.io/v1/ingresses
2024-08-26 18:00:18 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/networking.k8s.io/v1/ingresses
2024-08-26 18:00:18 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/networking.k8s.io/v1/networkpolicies
2024-08-26 18:00:18 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/networking.k8s.io/v1/networkpolicies
2024-08-26 18:00:19 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/policy/v1
2024-08-26 18:00:19 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/policy/v1/poddisruptionbudgets
2024-08-26 18:00:19 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/policy/v1/poddisruptionbudgets
2024-08-26 18:00:19 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/rbac.authorization.k8s.io/v1
2024-08-26 18:00:19 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
2024-08-26 18:00:19 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
2024-08-26 18:00:19 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/rbac.authorization.k8s.io/v1/clusterroles
2024-08-26 18:00:19 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/rbac.authorization.k8s.io/v1/clusterroles
2024-08-26 18:00:19 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/rbac.authorization.k8s.io/v1/rolebindings
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/rbac.authorization.k8s.io/v1/rolebindings
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/rbac.authorization.k8s.io/v1/roles
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/rbac.authorization.k8s.io/v1/roles
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/storage.k8s.io/v1
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/storage.k8s.io/v1/csidrivers
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/storage.k8s.io/v1/csidrivers
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/storage.k8s.io/v1/csinodes
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/storage.k8s.io/v1/csinodes
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/storage.k8s.io/v1/csistoragecapacities
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] ERROR Failed to get /apis/storage.k8s.io/v1/csistoragecapacities
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/storage.k8s.io/v1/storageclasses
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/storage.k8s.io/v1/storageclasses
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/storage.k8s.io/v1/volumeattachments
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/storage.k8s.io/v1/volumeattachments
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/admissionregistration.k8s.io/v1
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apiextensions.k8s.io/v1
2024-08-26 18:00:20 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apiextensions.k8s.io/v1/customresourcedefinitions
2024-08-26 18:00:23 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apiextensions.k8s.io/v1/customresourcedefinitions
2024-08-26 18:00:25 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/scheduling.k8s.io/v1
2024-08-26 18:00:25 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/scheduling.k8s.io/v1/priorityclasses
2024-08-26 18:00:25 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/scheduling.k8s.io/v1/priorityclasses
2024-08-26 18:00:25 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/coordination.k8s.io/v1
2024-08-26 18:00:25 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/coordination.k8s.io/v1/leases
2024-08-26 18:00:25 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/coordination.k8s.io/v1/leases
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/node.k8s.io/v1
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/node.k8s.io/v1/runtimeclasses
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/node.k8s.io/v1/runtimeclasses
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/discovery.k8s.io/v1
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/discovery.k8s.io/v1/endpointslices
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/discovery.k8s.io/v1/endpointslices
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/flowcontrol.apiserver.k8s.io/v1beta3
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] ERROR Failed to get /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] ERROR Failed to get /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/flowcontrol.apiserver.k8s.io/v1beta2
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/flowcontrol.apiserver.k8s.io/v1beta2/flowschemas
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] ERROR Failed to get /apis/flowcontrol.apiserver.k8s.io/v1beta2/flowschemas
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] ERROR Failed to get /apis/flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps.openshift.io/v1
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps.openshift.io/v1/deploymentconfigs
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/apps.openshift.io/v1/deploymentconfigs
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authorization.openshift.io/v1
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authorization.openshift.io/v1/clusterrolebindings
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authorization.openshift.io/v1/clusterrolebindings
2024-08-26 18:00:26 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authorization.openshift.io/v1/clusterroles
2024-08-26 18:00:27 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authorization.openshift.io/v1/clusterroles
2024-08-26 18:00:27 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authorization.openshift.io/v1/rolebindingrestrictions
2024-08-26 18:00:27 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authorization.openshift.io/v1/rolebindingrestrictions
2024-08-26 18:00:27 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authorization.openshift.io/v1/rolebindings
2024-08-26 18:00:27 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authorization.openshift.io/v1/rolebindings
2024-08-26 18:00:27 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authorization.openshift.io/v1/roles
2024-08-26 18:00:28 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/authorization.openshift.io/v1/roles
2024-08-26 18:00:28 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/build.openshift.io/v1
2024-08-26 18:00:28 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/build.openshift.io/v1/buildconfigs
2024-08-26 18:00:28 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/build.openshift.io/v1/buildconfigs
2024-08-26 18:00:28 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/build.openshift.io/v1/builds
2024-08-26 18:00:28 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/build.openshift.io/v1/builds
2024-08-26 18:00:28 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/image.openshift.io/v1
2024-08-26 18:00:28 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/image.openshift.io/v1/images
2024-08-26 18:00:28 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/image.openshift.io/v1/images
2024-08-26 18:00:28 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/image.openshift.io/v1/imagestreams
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/image.openshift.io/v1/imagestreams
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/image.openshift.io/v1/imagestreamtags
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/image.openshift.io/v1/imagestreamtags
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/image.openshift.io/v1/imagetags
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/image.openshift.io/v1/imagetags
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/oauth.openshift.io/v1
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/oauth.openshift.io/v1/oauthaccesstokens
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] ERROR Failed to get /apis/oauth.openshift.io/v1/oauthaccesstokens
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/oauth.openshift.io/v1/oauthauthorizetokens
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] ERROR Failed to get /apis/oauth.openshift.io/v1/oauthauthorizetokens
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/oauth.openshift.io/v1/oauthclientauthorizations
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/oauth.openshift.io/v1/oauthclientauthorizations
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/oauth.openshift.io/v1/oauthclients
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] ERROR Failed to get /apis/oauth.openshift.io/v1/oauthclients
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/oauth.openshift.io/v1/useroauthaccesstokens
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/oauth.openshift.io/v1/useroauthaccesstokens
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/project.openshift.io/v1
2024-08-26 18:00:29 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/project.openshift.io/v1/projectrequests
2024-08-26 18:00:30 jan-Standard-PC-Q35-ICH9-2009 scout[7516] INFO GET /apis/project.openshift.io/v1/projectrequests
2024-08-26 18:00:30 jan-Standard-PC-Q35-ICH9-2009 scout[7516] ERROR __main__.py L257: Initialization failure: 'items'
Traceback (most recent call last):
  File "/home/jan/Documents/ScoutSuite/venv/lib/python3.12/site-packages/ScoutSuite/__main__.py", line 257, in _run
    cloud_provider = get_provider(provider=provider,
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jan/Documents/ScoutSuite/venv/lib/python3.12/site-packages/ScoutSuite/providers/__init__.py", line 39, in get_provider
    provider_instance = provider_object(profile=profile,
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jan/Documents/ScoutSuite/venv/lib/python3.12/site-packages/ScoutSuite/providers/kubernetes/provider.py", line 59, in __init__
    super().__init__(report_dir, timestamp, resources, skipped_resources, result_format)
  File "/home/jan/Documents/ScoutSuite/venv/lib/python3.12/site-packages/ScoutSuite/providers/base/provider.py", line 41, in __init__
    self.services = self.services_config(self.credentials)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jan/Documents/ScoutSuite/venv/lib/python3.12/site-packages/ScoutSuite/providers/kubernetes/services.py", line 34, in __init__
    extra_resources = facade.extra.get_resources()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jan/Documents/ScoutSuite/venv/lib/python3.12/site-packages/ScoutSuite/providers/kubernetes/facade/extra.py", line 40, in get_resources
    resources = self.get(endpoint)['items']
                ~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'items'

Additional context

The connection to the cluster works fine otherwise and I have admin read access. Inspecting the cluster with other tools works.

morganleroi commented 1 month ago

Exact same issue since few days.

philippkind commented 1 month ago

same issue too

richjyoung commented 2 weeks ago

same issue on IONOS managed kubernetes

liyun-li commented 1 week ago

dev for the k8s module here and thanks for letting us know! this is probably not the answer you are looking for but i haven't had a chance to interact with any openshift clusters so i am not sure what could be causing the issue...k8s also made quite a few changes to its api including deprecating the core endpoint, so i will need some time to investigate...

PRs are appreciated too since we don't have an openshift environment internally to test