Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jgirlich-iteratec opened this issue Aug 26, 2024 · 4 comments
Labels
bug Something isn't working potential Unconfirmed issue

Comments

@jgirlich-iteratec
Copy link

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.

@jgirlich-iteratec jgirlich-iteratec added bug Something isn't working potential Unconfirmed issue labels Aug 26, 2024
@morganleroi
Copy link

Exact same issue since few days.

@philippkind
Copy link

same issue too

@richjyoung
Copy link

same issue on IONOS managed kubernetes

@liyun-li
Copy link
Contributor

liyun-li commented Nov 12, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working potential Unconfirmed issue
Projects
None yet
Development

No branches or pull requests

6 participants
@morganleroi @richjyoung @liyun-li @philippkind @jgirlich-iteratec and others