Official Python client library for kubernetes
This report summarizes scanner evidence for kubernetes-client/python, a Python project with 7,679 GitHub stars. SynthScan examined 1,479,095 lines of code across 7512 source files, recording 24208 pattern matches distributed across 18 syntactic categories. The legacy adjusted pattern signal is 36.2 (High pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 6923 finding(s).
Are imports declared and package/API names verified? 7417 finding(s).
Are wrappers, guards, and repeated structures necessary? 16450 finding(s).
Which changes need focused human review? 24208 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 24208 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | examples_asyncio/dynamic-client/service.py | 0 | this example demonstrates the following: - creation of a k8s configmap using dynamic-client - list, patch(update), delet | STRING |
| HIGH | examples/dynamic-client/service.py | 0 | this example demonstrates the following: - creation of a k8s configmap using dynamic-client - list, patch(update), delet | STRING |
| HIGH | examples_asyncio/dynamic-client/configmap.py | 0 | this example demonstrates the following: - creation of a k8s configmap using dynamic-client - list, patch(update), delet | STRING |
| HIGH | examples/dynamic-client/configmap.py | 0 | this example demonstrates the following: - creation of a k8s configmap using dynamic-client - list, patch(update), delet | STRING |
| HIGH | …s_asyncio/dynamic-client/namespaced_custom_resource.py | 0 | this example demonstrates the following: - creation of a custom resource definition (crd) using dynamic-client - creatio | STRING |
| HIGH | examples/dynamic-client/namespaced_custom_resource.py | 0 | this example demonstrates the following: - creation of a custom resource definition (crd) using dynamic-client - creatio | STRING |
| HIGH | …yncio/dynamic-client/cluster_scoped_custom_resource.py | 0 | this example demonstrates the following: - creation of a custom resource definition (crd) using dynamic-client - creatio | STRING |
| HIGH | …mples/dynamic-client/cluster_scoped_custom_resource.py | 0 | this example demonstrates the following: - creation of a custom resource definition (crd) using dynamic-client - creatio | STRING |
| HIGH | kubernetes/aio/utils/_retry_base.py | 0 | retry backoff parameters. this maps 1:1 to ``k8s.io/apimachinery/pkg/util/wait.backoff`` for the fields used by client-g | STRING |
| HIGH | kubernetes/utils/_retry_base.py | 0 | retry backoff parameters. this maps 1:1 to ``k8s.io/apimachinery/pkg/util/wait.backoff`` for the fields used by client-g | STRING |
| HIGH | kubernetes/base/retry.py | 0 | retry backoff parameters. this maps 1:1 to ``k8s.io/apimachinery/pkg/util/wait.backoff`` for the fields used by client-g | STRING |
| HIGH | kubernetes/aio/utils/_retry_base.py | 0 | return the client-go rest retry-after backoff for ``retries``. ``backoff`` supplies the retry delay parameters. if ``ret | STRING |
| HIGH | kubernetes/utils/_retry_base.py | 0 | return the client-go rest retry-after backoff for ``retries``. ``backoff`` supplies the retry delay parameters. if ``ret | STRING |
| HIGH | kubernetes/base/retry.py | 0 | return the client-go rest retry-after backoff for ``retries``. ``backoff`` supplies the retry delay parameters. if ``ret | STRING |
| HIGH | kubernetes/aio/utils/_retry_base.py | 0 | return the client-go rest retry-after retry ceiling. | STRING |
| HIGH | kubernetes/utils/_retry_base.py | 0 | return the client-go rest retry-after retry ceiling. | STRING |
| HIGH | kubernetes/base/retry.py | 0 | return the client-go rest retry-after retry ceiling. | STRING |
| HIGH | kubernetes/aio/utils/_retry_base.py | 0 | return true if ``error`` represents an http 409 conflict response. | STRING |
| HIGH | kubernetes/utils/_retry_base.py | 0 | return true if ``error`` represents an http 409 conflict response. | STRING |
| HIGH | kubernetes/base/retry.py | 0 | return true if ``error`` represents an http 409 conflict response. | STRING |
| HIGH | kubernetes/aio/utils/_retry_base.py | 0 | return true if ``error`` represents http 429 too many requests. | STRING |
| HIGH | kubernetes/utils/_retry_base.py | 0 | return true if ``error`` represents http 429 too many requests. | STRING |
| HIGH | kubernetes/base/retry.py | 0 | return true if ``error`` represents http 429 too many requests. | STRING |
| HIGH | kubernetes/aio/utils/_retry_base.py | 0 | return true if ``error`` should be retried after retry-after. | STRING |
| HIGH | kubernetes/utils/_retry_base.py | 0 | return true if ``error`` should be retried after retry-after. | STRING |
| HIGH | kubernetes/base/retry.py | 0 | return true if ``error`` should be retried after retry-after. | STRING |
| HIGH | kubernetes/aio/utils/_retry_base.py | 0 | return the retry-after delay in seconds, if ``error`` provides one. client-go accepts integer seconds. invalid, missing, | STRING |
| HIGH | kubernetes/utils/_retry_base.py | 0 | return the retry-after delay in seconds, if ``error`` provides one. client-go accepts integer seconds. invalid, missing, | STRING |
| HIGH | kubernetes/base/retry.py | 0 | return the retry-after delay in seconds, if ``error`` provides one. client-go accepts integer seconds. invalid, missing, | STRING |
| HIGH | …netes/aio/leaderelection/resourcelock/configmaplock.py | 0 | :param name: name of the lock :param namespace: namespace :param identity: a unique identifier that the candidate is usi | STRING |
| HIGH | kubernetes/aio/leaderelection/resourcelock/leaselock.py | 0 | :param name: name of the lock :param namespace: namespace :param identity: a unique identifier that the candidate is usi | STRING |
| HIGH | kubernetes/leaderelection/resourcelock/configmaplock.py | 0 | :param name: name of the lock :param namespace: namespace :param identity: a unique identifier that the candidate is usi | STRING |
| HIGH | kubernetes/leaderelection/resourcelock/leaselock.py | 0 | :param name: name of the lock :param namespace: namespace :param identity: a unique identifier that the candidate is usi | STRING |
| HIGH | …netes/aio/leaderelection/resourcelock/configmaplock.py | 0 | :param name: name of the lease object information to get :param namespace: namespace in which the lease object is to be | STRING |
| HIGH | kubernetes/aio/leaderelection/resourcelock/baselock.py | 0 | :param name: name of the lease object information to get :param namespace: namespace in which the lease object is to be | STRING |
| HIGH | kubernetes/leaderelection/resourcelock/configmaplock.py | 0 | :param name: name of the lease object information to get :param namespace: namespace in which the lease object is to be | STRING |
| HIGH | kubernetes/aio/leaderelection/resourcelock/leaselock.py | 0 | :param name: name of the lease object information to get :param namespace: namespace in which the lease object is to be | STRING |
| HIGH | kubernetes/leaderelection/resourcelock/leaselock.py | 0 | :param name: name of the lease object information to get :param namespace: namespace in which the lease object is to be | STRING |
| HIGH | …netes/aio/leaderelection/resourcelock/configmaplock.py | 0 | :param election_record: annotation string :param name: name of the configmap object to be created :param namespace: name | STRING |
| HIGH | kubernetes/aio/leaderelection/resourcelock/baselock.py | 0 | :param election_record: annotation string :param name: name of the configmap object to be created :param namespace: name | STRING |
| HIGH | kubernetes/aio/leaderelection/resourcelock/leaselock.py | 0 | :param election_record: annotation string :param name: name of the configmap object to be created :param namespace: name | STRING |
| HIGH | kubernetes/leaderelection/resourcelock/configmaplock.py | 0 | :param election_record: annotation string :param name: name of the configmap object to be created :param namespace: name | STRING |
| HIGH | …netes/aio/leaderelection/resourcelock/configmaplock.py | 0 | :param name: name of the lock to be updated :param namespace: namespace the lock is in :param updated_record: the update | STRING |
| HIGH | kubernetes/aio/leaderelection/resourcelock/baselock.py | 0 | :param name: name of the lock to be updated :param namespace: namespace the lock is in :param updated_record: the update | STRING |
| HIGH | kubernetes/aio/leaderelection/resourcelock/leaselock.py | 0 | :param name: name of the lock to be updated :param namespace: namespace the lock is in :param updated_record: the update | STRING |
| HIGH | kubernetes/leaderelection/resourcelock/configmaplock.py | 0 | :param name: name of the lock to be updated :param namespace: namespace the lock is in :param updated_record: the update | STRING |
| HIGH | kubernetes/leaderelection/resourcelock/leaselock.py | 0 | :param name: name of the lock to be updated :param namespace: namespace the lock is in :param updated_record: the update | STRING |
| HIGH | kubernetes/aio/client/configuration.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| HIGH | kubernetes/aio/client/rest.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| HIGH | kubernetes/aio/client/__init__.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| HIGH | kubernetes/aio/client/exceptions.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| HIGH | kubernetes/aio/client/api_client.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| HIGH | …rnetes/aio/client/models/v1_ingress_service_backend.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| HIGH | …/client/models/v1beta2_resource_claim_template_spec.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| HIGH | kubernetes/aio/client/models/v1_limit_response.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| HIGH | …nt/models/v1_mutating_admission_policy_binding_spec.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| HIGH | kubernetes/aio/client/models/v1_pod_volume_health.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| HIGH | …ernetes/aio/client/models/v1_scale_io_volume_source.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| HIGH | …aio/client/models/v1beta1_node_allocatable_overhead.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| HIGH | kubernetes/aio/client/models/v1_role_binding.py | 0 | kubernetes no description provided (generated by openapi generator https://github.com/openapitools/openapi-generator) th | STRING |
| 8123 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/cluster_scoped_custom_object.py | 54 | CODE | |
| LOW | examples/job_crud.py | 19 | CODE | |
| LOW | examples/job_crud.py | 22 | CODE | |
| LOW | examples/remote_cluster.py | 21 | CODE | |
| LOW | examples/multiple_clusters.py | 24 | CODE | |
| LOW | examples/informer_example.py | 24 | CODE | |
| LOW | kubernetes/__init__.py | 19 | CODE | |
| LOW | kubernetes/__init__.py | 20 | CODE | |
| LOW | kubernetes/__init__.py | 21 | CODE | |
| LOW | kubernetes/__init__.py | 22 | CODE | |
| LOW | kubernetes/__init__.py | 23 | CODE | |
| LOW | kubernetes/__init__.py | 24 | CODE | |
| LOW | kubernetes/__init__.py | 25 | CODE | |
| LOW | kubernetes/__init__.py | 26 | CODE | |
| LOW | kubernetes/dynamic/discovery.py | 28 | CODE | |
| LOW | kubernetes/dynamic/client.py | 20 | CODE | |
| LOW | kubernetes/dynamic/client.py | 22 | CODE | |
| LOW | kubernetes/dynamic/client.py | 22 | CODE | |
| LOW | kubernetes/dynamic/client.py | 22 | CODE | |
| LOW | kubernetes/dynamic/client.py | 22 | CODE | |
| LOW | kubernetes/dynamic/__init__.py | 15 | CODE | |
| LOW | kubernetes/test/test_apis_alias.py | 60 | CODE | |
| LOW | kubernetes/config/__init__.py | 17 | CODE | |
| LOW | kubernetes/config/__init__.py | 19 | CODE | |
| LOW | kubernetes/config/__init__.py | 19 | CODE | |
| LOW | kubernetes/config/__init__.py | 19 | CODE | |
| LOW | kubernetes/config/__init__.py | 19 | CODE | |
| LOW | kubernetes/config/exec_provider_test.py | 16 | CODE | |
| LOW | kubernetes/config/kube_config_test.py | 20 | CODE | |
| LOW | kubernetes/config/incluster_config_test.py | 18 | CODE | |
| LOW | kubernetes/stream/__init__.py | 15 | CODE | |
| LOW | kubernetes/stream/__init__.py | 15 | CODE | |
| LOW | kubernetes/stream/ws_client.py | 14 | CODE | |
| LOW | kubernetes/stream/ws_client.py | 19 | CODE | |
| LOW | kubernetes/stream/ws_client.py | 31 | CODE | |
| LOW | kubernetes/stream/ws_client_test.py | 28 | CODE | |
| LOW | kubernetes/aio/__init__.py | 19 | CODE | |
| LOW | kubernetes/aio/__init__.py | 20 | CODE | |
| LOW | kubernetes/aio/__init__.py | 21 | CODE | |
| LOW | kubernetes/aio/__init__.py | 22 | CODE | |
| LOW | kubernetes/aio/__init__.py | 23 | CODE | |
| LOW | kubernetes/aio/__init__.py | 24 | CODE | |
| LOW | kubernetes/aio/__init__.py | 25 | CODE | |
| LOW | kubernetes/aio/dynamic/client.py | 18 | CODE | |
| LOW | kubernetes/aio/dynamic/client.py | 20 | CODE | |
| LOW | kubernetes/aio/dynamic/client.py | 20 | CODE | |
| LOW | kubernetes/aio/dynamic/client.py | 20 | CODE | |
| LOW | kubernetes/aio/dynamic/client.py | 20 | CODE | |
| LOW | kubernetes/aio/dynamic/__init__.py | 15 | CODE | |
| LOW | kubernetes/aio/config/__init__.py | 17 | CODE | |
| LOW | kubernetes/aio/config/__init__.py | 19 | CODE | |
| LOW | kubernetes/aio/config/__init__.py | 19 | CODE | |
| LOW | kubernetes/aio/config/__init__.py | 19 | CODE | |
| LOW | kubernetes/aio/config/__init__.py | 19 | CODE | |
| LOW | kubernetes/aio/config/__init__.py | 19 | CODE | |
| LOW | kubernetes/aio/config/incluster_config_test.py | 18 | CODE | |
| LOW | kubernetes/aio/stream/__init__.py | 15 | CODE | |
| LOW | kubernetes/aio/utils/__init__.py | 15 | CODE | |
| LOW | kubernetes/aio/utils/__init__.py | 17 | CODE | |
| LOW | kubernetes/aio/utils/__init__.py | 17 | CODE | |
| 7345 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/rollout-daemonset.py | 73 | def rollout_namespaced_daemon_set( | CODE |
| LOW | examples/pod_portforward.py | 128 | def kubernetes_create_connection(address, *args, **kwargs): | CODE |
| LOW⚡ | examples/metrics_example.py | 96 | def print_filtered_pod_metrics(api_client, namespace, labels): | CODE |
| LOW⚡ | examples/metrics_example.py | 123 | def print_multi_namespace_metrics(api_client, namespaces): | CODE |
| LOW | examples/cronjob_crud.py | 11 | def create_namespaced_cron_job(namespace='default', body=None): | CODE |
| LOW | examples/cronjob_crud.py | 28 | def delete_namespaced_cron_job(namespace='default', name=None): | CODE |
| LOW | examples/cronjob_crud.py | 42 | def patch_namespaced_cron_job(namespace='default', body=None): | CODE |
| LOW | examples/rollout-statefulset.py | 39 | def create_stateful_set_object(): | CODE |
| LOW | examples/rollout-statefulset.py | 101 | def rollout_namespaced_stateful_set( | CODE |
| LOW | examples/dynamic-client/namespaced_custom_resource.py | 29 | def list_ingressroute_for_all_namespaces(group, version, plural): | CODE |
| LOW | doc/source/conf.py | 24 | def _copy_with_converting_link_to_repo(filename, new_filename): | CODE |
| LOW | kubernetes/dynamic/discovery.py | 156 | def get_resources_for_api_version(self, prefix, group, version, preferred): | CODE |
| LOW | kubernetes/dynamic/test_discovery.py | 30 | def test_init_cache_from_file(self): | CODE |
| LOW | kubernetes/dynamic/test_discovery.py | 42 | def test_cache_decoder_resource_and_subresource(self): | CODE |
| LOW | kubernetes/dynamic/test_client.py | 38 | def test_cluster_custom_resources(self): | CODE |
| LOW | kubernetes/dynamic/test_client.py | 137 | def test_async_namespaced_custom_resources(self): | CODE |
| LOW | kubernetes/dynamic/test_client.py | 252 | def test_namespaced_custom_resources(self): | CODE |
| LOW | kubernetes/dynamic/test_client.py | 405 | def test_replication_controller_apis(self): | CODE |
| LOW | kubernetes/dynamic/test_client.py | 498 | def test_node_apis_partial_object_metadata(self): | CODE |
| LOW | kubernetes/dynamic/test_client.py | 516 | def test_server_side_apply_api(self): | CODE |
| LOW | kubernetes/dynamic/test_client.py | 555 | def test_resource_instance_type(self): | CODE |
| LOW | kubernetes/dynamic/client_test.py | 27 | def test_request_translates_http_errors(self): | CODE |
| LOW | kubernetes/dynamic/client_test.py | 64 | def test_request_preserves_resolved_async_req_response(self): | CODE |
| LOW | kubernetes/dynamic/client_test.py | 106 | def test_apply_patch_serializes_object_body(self): | CODE |
| LOW | kubernetes/dynamic/client_test.py | 152 | def test_no_proxy_bypasses_configured_proxy(self): | CODE |
| LOW | kubernetes/dynamic/client_test.py | 211 | def test_watch_forwards_send_initial_events(self): | CODE |
| LOW | kubernetes/dynamic/client_test.py | 238 | def test_request_builds_send_initial_events_query_params(self): | CODE |
| LOW⚡ | kubernetes/test/test_api_client.py | 16 | def test_context_manager_closes_threadpool(self): | CODE |
| LOW⚡ | kubernetes/test/test_api_client.py | 24 | def test_atexit_closes_threadpool(self, register): | CODE |
| LOW⚡ | kubernetes/test/test_api_client.py | 33 | def test_deserialize_dict_syntax_compatibility(self): | CODE |
| LOW | kubernetes/test/test_api_client.py | 71 | def test_client_go_read_retries_do_not_override_write_retries(self): | CODE |
| LOW⚡ | kubernetes/test/test_api_client.py | 107 | def test_auth_settings_with_bearer_token_key(self): | CODE |
| LOW⚡ | kubernetes/test/test_api_client.py | 113 | def test_auth_settings_with_authorization_key(self): | CODE |
| LOW⚡ | kubernetes/test/test_api_client.py | 119 | def test_auth_settings_bearer_token_takes_precedence(self): | CODE |
| LOW⚡ | kubernetes/test/test_api_client.py | 126 | def test_auth_settings_with_no_token(self): | CODE |
| LOW⚡ | kubernetes/test/test_api_client.py | 131 | def test_auth_settings_with_authorization_key_and_prefix(self): | CODE |
| LOW | kubernetes/test/test_api_client.py | 144 | async def test_auth_settings_with_authorization_key_and_prefix(self): | CODE |
| LOW | kubernetes/test/test_api_client.py | 154 | async def test_auth_settings_bearer_token_takes_precedence(self): | CODE |
| LOW | kubernetes/test/test_apis_alias.py | 36 | def test_from_import_submodule(self): | CODE |
| LOW | kubernetes/test/test_apis_alias.py | 43 | def test_every_api_submodule_is_reachable(self): | CODE |
| LOW | kubernetes/test/test_apis_alias.py | 63 | def test_non_submodule_names_are_not_imported(self): | CODE |
| LOW | kubernetes/test/test_apis_alias.py | 70 | def test_missing_dependency_propagates(self): | CODE |
| LOW | kubernetes/test/test_metrics.py | 26 | def test_get_nodes_metrics_success(self, mock_custom_api_class): | CODE |
| LOW | kubernetes/test/test_metrics.py | 58 | def test_get_pods_metrics_success(self, mock_custom_api_class): | CODE |
| LOW | kubernetes/test/test_metrics.py | 95 | def test_get_pods_metrics_with_label_selector(self, mock_custom_api_class): | CODE |
| LOW⚡ | kubernetes/test/test_metrics.py | 113 | def test_get_pods_metrics_empty_namespace_raises_error(self): | CODE |
| LOW⚡ | kubernetes/test/test_metrics.py | 120 | def test_get_pods_metrics_none_namespace_raises_error(self): | CODE |
| LOW⚡ | kubernetes/test/test_metrics.py | 128 | def test_get_pods_metrics_in_all_namespaces_success(self, mock_get_pods): | CODE |
| LOW | kubernetes/test/test_metrics.py | 147 | def test_get_pods_metrics_in_all_namespaces_with_errors(self, mock_get_pods): | CODE |
| LOW | kubernetes/test/test_metrics.py | 167 | def test_get_pods_metrics_in_all_namespaces_with_label_selector(self, mock_get_pods): | CODE |
| LOW | kubernetes/test/test_typing.py | 25 | def test_root_package_is_marked_as_typed(self): | CODE |
| LOW | kubernetes/test/test_typing.py | 28 | def test_synchronous_nested_model_types(self): | CODE |
| LOW | kubernetes/test/test_typing.py | 53 | def test_asynchronous_nested_model_types(self): | CODE |
| LOW⚡ | kubernetes/test/test_informer.py | 152 | def test_remove_unknown_handler_noop(self): | CODE |
| LOW⚡ | kubernetes/test/test_informer.py | 155 | def test_invalid_event_type_raises(self): | CODE |
| LOW⚡ | kubernetes/test/test_informer.py | 159 | def test_handler_exception_is_swallowed(self): | CODE |
| LOW⚡ | kubernetes/test/test_informer.py | 541 | def test_multiple_handlers_all_fire(self): | CODE |
| LOW⚡ | kubernetes/test/test_informer.py | 897 | def test_same_handler_registered_twice_fires_twice(self): | CODE |
| LOW | kubernetes/test/test_informer.py | 76 | def test_remove_nonexistent_is_noop(self): | CODE |
| LOW | kubernetes/test/test_informer.py | 138 | def test_add_handler_and_fire(self): | CODE |
| 4717 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples_asyncio/in_cluster_config.py | 75 | except Exception: | CODE |
| LOW | examples/metrics_example.py | 59 | except Exception as e: | CODE |
| MEDIUM | examples/metrics_example.py | 60 | print(f"Error fetching node metrics: {e}") | CODE |
| LOW⚡ | examples/metrics_example.py | 92 | except Exception as e: | CODE |
| MEDIUM⚡ | examples/metrics_example.py | 93 | print(f"Error fetching pod metrics: {e}") | CODE |
| LOW⚡ | examples/metrics_example.py | 119 | except Exception as e: | CODE |
| MEDIUM⚡ | examples/metrics_example.py | 120 | print(f"Error fetching filtered pod metrics: {e}") | CODE |
| LOW | examples/metrics_example.py | 148 | except Exception as e: | CODE |
| MEDIUM | examples/metrics_example.py | 149 | print(f"Error fetching multi-namespace metrics: {e}") | CODE |
| LOW⚡ | examples/pod_logs.py | 49 | except Exception as e: | CODE |
| MEDIUM⚡ | examples/pod_logs.py | 50 | print(f"Error getting logs for pod {pod_name}, container {container_name}: {e}") | CODE |
| LOW⚡ | examples/pod_logs.py | 52 | except Exception as e: | CODE |
| MEDIUM⚡ | examples/pod_logs.py | 53 | print(f"Error: {e}") | CODE |
| MEDIUM | examples/pod_logs.py | 22 | def list_pods_with_logs(): | CODE |
| LOW | examples/apply_from_dict.py | 19 | except Exception as e: | CODE |
| LOW | kubernetes/dynamic/discovery.py | 65 | except Exception as e: | CODE |
| LOW | kubernetes/dynamic/discovery.py | 77 | except Exception: | CODE |
| MEDIUM | kubernetes/dynamic/discovery.py | 73 | def _write_cache(self): | CODE |
| MEDIUM | kubernetes/test/test_informer.py | 104 | def worker(n): | CODE |
| MEDIUM | kubernetes/test/test_informer.py | 1056 | def worker(): | CODE |
| LOW | kubernetes/test/test_informer.py | 108 | except Exception as exc: | CODE |
| LOW | kubernetes/test/test_informer.py | 1064 | except Exception as exc: | CODE |
| LOW | kubernetes/config/kube_config.py | 473 | except Exception as e: | CODE |
| LOW | kubernetes/aio/dynamic/discovery.py | 82 | except Exception as e: | CODE |
| LOW | kubernetes/aio/dynamic/discovery.py | 94 | except Exception: | CODE |
| MEDIUM | kubernetes/aio/dynamic/discovery.py | 90 | def _write_cache(self): | CODE |
| LOW | kubernetes/aio/config/kube_config.py | 357 | except Exception as e: | CODE |
| MEDIUM | kubernetes/aio/config/kube_config.py | 324 | def load_from_exec_plugin(self): | CODE |
| LOW | kubernetes/aio/utils/retry.py | 56 | except Exception as error: | CODE |
| LOW | kubernetes/aio/utils/retry.py | 98 | except Exception as error: | CODE |
| LOW | kubernetes/aio/docs/ApiregistrationApi.md | 51 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/LogsApi.md | 48 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/LogsApi.md | 118 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 87 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 174 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 262 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 353 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 445 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 546 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 654 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 763 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 864 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 949 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 1034 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 1133 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 1233 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 1333 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 1427 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 1517 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 1607 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 1697 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 1788 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 1880 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 1966 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 2045 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 2124 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 2203 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 2283 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 2364 | except Exception as e: | CODE |
| LOW | kubernetes/aio/docs/CertificatesV1Api.md | 2448 | except Exception as e: | CODE |
| 1570 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kubernetes/dynamic/client.py | 161 | CODE | |
| LOW | kubernetes/dynamic/resource.py | 25 | CODE | |
| LOW | kubernetes/aio/dynamic/resource.py | 25 | CODE | |
| LOW | kubernetes/aio/client/configuration.py | 214 | CODE | |
| LOW | kubernetes/aio/client/api_client.py | 173 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 67 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 153 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 239 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 409 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 495 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 581 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 751 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 879 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 1007 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 1274 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 1402 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 1530 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 1797 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 1894 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 1991 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 2185 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 2282 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 2379 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 2826 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 2938 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 3050 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 3286 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 3398 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 3510 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 3746 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 3839 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 3932 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 4134 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 4227 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 4320 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 5092 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 5181 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 5270 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 5446 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 5535 | CODE | |
| LOW | …es/aio/client/api/admissionregistration_v1beta1_api.py | 5624 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 65 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 151 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 237 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 407 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 535 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 663 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 930 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 1027 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 1124 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 1571 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 1683 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 1795 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 2031 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 2124 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 2217 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 2704 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 2793 | CODE | |
| LOW | kubernetes/aio/client/api/node_v1_api.py | 2882 | CODE | |
| LOW | …ernetes/aio/client/api/flowcontrol_apiserver_v1_api.py | 67 | CODE | |
| 1745 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | setup-asyncio.py | 1 | # Copyright 2026 The Kubernetes Authors. | COMMENT |
| LOW | setup-release.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | .readthedocs.yaml | 21 | - cp -r doc/html/* $READTHEDOCS_OUTPUT/html/ | COMMENT |
| LOW | .readthedocs.yaml | 41 | # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html | COMMENT |
| LOW | .readthedocs.yaml | 61 | # cat latexmkrc | COMMENT |
| LOW | examples_asyncio/in_cluster_config.py | 1 | # Copyright 2017 The Kubernetes Authors. | COMMENT |
| LOW | examples_asyncio/in_cluster_config.py | 21 | # --- | COMMENT |
| LOW | examples_asyncio/dynamic-client/accept_header.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | examples_asyncio/dynamic-client/service.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | …s_asyncio/dynamic-client/deployment_rolling_restart.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | …s_asyncio/dynamic-client/namespaced_custom_resource.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | …yncio/dynamic-client/cluster_scoped_custom_resource.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | examples_asyncio/dynamic-client/configmap.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | examples_asyncio/dynamic-client/request_timeout.py | 1 | # Copyright 2023 The Kubernetes Authors. | COMMENT |
| LOW | examples_asyncio/dynamic-client/node.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | …mples_asyncio/dynamic-client/replication_controller.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | examples/cluster_scoped_custom_object.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | examples/enable_debug_logging.py | 1 | # Copyright 2025 The Kubernetes Authors. | COMMENT |
| LOW | examples/pod_config_list.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | examples/api_discovery.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | examples/ingress_create.py | 1 | # Copyright 2019 The Kubernetes Authors. | COMMENT |
| LOW | examples/job_crud.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | examples/node_labels.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | examples/deployment_crud.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | examples/namespaced_custom_object.py | 1 | # Copyright 2019 The Kubernetes Authors. | COMMENT |
| LOW | examples/__init__.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | examples/in_cluster_config.py | 1 | # Copyright 2017 The Kubernetes Authors. | COMMENT |
| LOW | examples/out_of_cluster_config.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | examples/pod_portforward.py | 1 | # Copyright 2020 The Kubernetes Authors. | COMMENT |
| LOW | examples/pod_portforward.py | 21 | import time | COMMENT |
| LOW | examples/pod_portforward.py | 41 | # Below also is an example of monkey patching the socket.create_connection | COMMENT |
| LOW | examples/metrics_example.py | 1 | #!/usr/bin/env python | COMMENT |
| LOW | examples/pod_logs.py | 1 | # Copyright 2025 The Kubernetes Authors. | COMMENT |
| LOW | examples/pod_exec.py | 1 | # Copyright 2019 The Kubernetes Authors. | COMMENT |
| LOW | examples/pick_kube_config_context.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | examples/remote_cluster.py | 1 | # Copyright 2018 The Kubernetes Authors. | COMMENT |
| LOW | examples/multiple_clusters.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | examples/deployment_create.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | examples/informer_example.py | 1 | # Copyright 2026 The Kubernetes Authors. | COMMENT |
| LOW | examples/dynamic-client/accept_header.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | examples/dynamic-client/service.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | examples/dynamic-client/deployment_rolling_restart.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | examples/dynamic-client/namespaced_custom_resource.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | …mples/dynamic-client/cluster_scoped_custom_resource.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | examples/dynamic-client/configmap.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | examples/dynamic-client/request_timeout.py | 1 | # Copyright 2023 The Kubernetes Authors. | COMMENT |
| LOW | examples/dynamic-client/node.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | examples/dynamic-client/replication_controller.py | 1 | # Copyright 2021 The Kubernetes Authors. | COMMENT |
| LOW | examples/watch/pod_namespace_watch.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | examples/watch/watch_recovery.py | 1 | # Copyright 2025 The Kubernetes Authors. | COMMENT |
| LOW | scripts/update-pycodestyle.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/update-client.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/constants.py | 1 | # Copyright 2016 The Kubernetes Authors. | COMMENT |
| LOW | scripts/kube-init.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/cherry_pick_pull.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/update-client-asyncio.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/release.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/release.sh | 21 | # API change happened in a k8s patch release, or we want to include some new | COMMENT |
| LOW | scripts/release.sh | 41 | # section that reflect the master branch state | COMMENT |
| 163 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | examples_asyncio/watch_ns_pods.py | 37 | # Define the tasks to watch namespaces and pods. | COMMENT |
| MEDIUM | examples_asyncio/dynamic-client/accept_header.py | 29 | # Creating a dynamic client | COMMENT |
| MEDIUM | examples_asyncio/dynamic-client/accept_header.py | 37 | # Creating a custom header | COMMENT |
| MEDIUM | examples_asyncio/dynamic-client/service.py | 30 | # Creating a dynamic client | COMMENT |
| MEDIUM | …s_asyncio/dynamic-client/deployment_rolling_restart.py | 33 | # Creating a dynamic client | COMMENT |
| MEDIUM | …s_asyncio/dynamic-client/namespaced_custom_resource.py | 46 | # Creating a dynamic client | COMMENT |
| MEDIUM | …s_asyncio/dynamic-client/namespaced_custom_resource.py | 59 | # Creating a Namespaced CRD named "ingressroutes.apps.example.com" | COMMENT |
| MEDIUM | …s_asyncio/dynamic-client/namespaced_custom_resource.py | 137 | # Creating a custom resource (CR) `ingress-route-*`, using the above CRD `ingressroutes.apps.example.com` | COMMENT |
| MEDIUM | …yncio/dynamic-client/cluster_scoped_custom_resource.py | 33 | # Creating a dynamic client | COMMENT |
| MEDIUM | …yncio/dynamic-client/cluster_scoped_custom_resource.py | 44 | # Creating a Namespaced CRD named "ingressroutes.apps.example.com" | COMMENT |
| MEDIUM | …yncio/dynamic-client/cluster_scoped_custom_resource.py | 123 | # Creating a custom resource (CR) `ingress-route-*`, using the above CRD `ingressroutes.apps.example.com` | COMMENT |
| MEDIUM | examples_asyncio/dynamic-client/configmap.py | 30 | # Creating a dynamic client | COMMENT |
| MEDIUM | examples_asyncio/dynamic-client/request_timeout.py | 30 | # Creating a dynamic client | COMMENT |
| MEDIUM | examples_asyncio/dynamic-client/node.py | 29 | # Creating a dynamic client | COMMENT |
| MEDIUM | …mples_asyncio/dynamic-client/replication_controller.py | 28 | # Creating a dynamic client | COMMENT |
| MEDIUM | examples/enable_debug_logging.py | 50 | # Create the deployment | COMMENT |
| MEDIUM | examples/annotate_deployment.py | 41 | # Create the Deployment in default namespace | COMMENT |
| MEDIUM | examples/job_crud.py | 39 | # Create the specification of deployment | COMMENT |
| MEDIUM | examples/job_crud.py | 100 | # Create a job object with client-python API. The job we | COMMENT |
| MEDIUM | examples/rollout-daemonset.py | 41 | # Create the Daemonset in default namespace | COMMENT |
| MEDIUM | examples/deployment_crud.py | 49 | # Create the specification of deployment | COMMENT |
| MEDIUM | examples/deployment_crud.py | 156 | # Create a deployment object with client-python API. The deployment we | COMMENT |
| MEDIUM | examples/remote_cluster.py | 25 | # Define the bearer token we are going to use to authenticate. | COMMENT |
| MEDIUM | examples/remote_cluster.py | 30 | # Create a configuration object | COMMENT |
| MEDIUM | examples/remote_cluster.py | 47 | # Create a ApiClient with our config | COMMENT |
| MEDIUM | examples/rollout-statefulset.py | 34 | # Create the service in specified namespace | COMMENT |
| MEDIUM | examples/rollout-statefulset.py | 69 | # Create the Statefulset in default namespace | COMMENT |
| MEDIUM | examples/dynamic-client/accept_header.py | 24 | # Creating a dynamic client | COMMENT |
| MEDIUM | examples/dynamic-client/accept_header.py | 32 | # Creating a custom header | COMMENT |
| MEDIUM | examples/dynamic-client/service.py | 26 | # Creating a dynamic client | COMMENT |
| MEDIUM | examples/dynamic-client/deployment_rolling_restart.py | 29 | # Creating a dynamic client | COMMENT |
| MEDIUM | examples/dynamic-client/namespaced_custom_resource.py | 64 | # Creating a dynamic client | COMMENT |
| MEDIUM | examples/dynamic-client/namespaced_custom_resource.py | 76 | # Creating a Namespaced CRD named "ingressroutes.apps.example.com" | COMMENT |
| MEDIUM | examples/dynamic-client/namespaced_custom_resource.py | 152 | # Creating a custom resource (CR) `ingress-route-*`, using the above CRD `ingressroutes.apps.example.com` | COMMENT |
| MEDIUM | …mples/dynamic-client/cluster_scoped_custom_resource.py | 30 | # Creating a dynamic client | COMMENT |
| MEDIUM | …mples/dynamic-client/cluster_scoped_custom_resource.py | 40 | # Creating a Namespaced CRD named "ingressroutes.apps.example.com" | COMMENT |
| MEDIUM | …mples/dynamic-client/cluster_scoped_custom_resource.py | 118 | # Creating a custom resource (CR) `ingress-route-*`, using the above CRD `ingressroutes.apps.example.com` | COMMENT |
| MEDIUM | examples/dynamic-client/configmap.py | 26 | # Creating a dynamic client | COMMENT |
| MEDIUM | examples/dynamic-client/request_timeout.py | 26 | # Creating a dynamic client | COMMENT |
| MEDIUM | examples/dynamic-client/node.py | 25 | # Creating a dynamic client | COMMENT |
| MEDIUM | examples/dynamic-client/replication_controller.py | 24 | # Creating a dynamic client | COMMENT |
| MEDIUM | examples/yaml_dir/pod.yml | 12 | # Define the environment variable | COMMENT |
| MEDIUM | examples/yaml_dir/configmap-demo-pod.yml | 31 | # Define the environment variable | COMMENT |
| MEDIUM | scripts/release.sh | 103 | # Create a local branch | COMMENT |
| MEDIUM | doc/html/usage.html | 135 | <span class="c1"># Create the specification of deployment</span> | CODE |
| MEDIUM | doc/html/usage.html | 242 | <span class="c1"># Create a deployment object with client-python API. The deployment we</span> | CODE |
| MEDIUM | kubernetes/stream/ws_client_test.py | 38 | # Creating a kubeconfig | COMMENT |
| MEDIUM | kubernetes/aio/dynamic/discovery_test.py | 82 | # Create a mock client with the necessary attributes | COMMENT |
| MEDIUM | kubernetes/aio/utils/_retry_base.py | 20 | # This module contains common pieces for 1:1 Python implementations of the | COMMENT |
| MEDIUM | kubernetes/utils/_retry_base.py | 20 | # This module contains common pieces for 1:1 Python implementations of the | COMMENT |
| MEDIUM | kubernetes/base/retry.py | 20 | # This module contains common pieces for 1:1 Python implementations of the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | examples/informer_example.py | 67 | except KeyboardInterrupt: | CODE |
| HIGH | kubernetes/dynamic/discovery.py | 77 | except Exception: | CODE |
| HIGH | kubernetes/config/kube_config.py | 58 | except OSError: | CODE |
| HIGH | kubernetes/config/incluster_config_test.py | 135 | except ConfigException: | CODE |
| HIGH | kubernetes/stream/ws_client_test.py | 34 | except ImportError: | CODE |
| HIGH | kubernetes/aio/dynamic/discovery.py | 94 | except Exception: | CODE |
| HIGH | kubernetes/aio/config/kube_config.py | 50 | except OSError: | CODE |
| HIGH | kubernetes/aio/config/incluster_config_test.py | 128 | except ConfigException: | CODE |
| HIGH | kubernetes/aio/leaderelection/resourcelock/leaselock.py | 164 | except ValueError: | CODE |
| HIGH | kubernetes/aio/e2e_test/base.py | 43 | except ConnectionRefusedError: | CODE |
| HIGH | kubernetes/aio/client/exceptions.py | 128 | except Exception: | CODE |
| HIGH | kubernetes/informer/informer.py | 133 | except (KeyError, ValueError): | CODE |
| HIGH | kubernetes/e2e_test/test_utils.py | 630 | except: | CODE |
| HIGH | kubernetes/e2e_test/test_utils.py | 637 | except: | CODE |
| HIGH | …bernetes/e2e_test/test_issue_2387_proxy_ssl_context.py | 66 | except OSError: | CODE |
| HIGH | …bernetes/e2e_test/test_issue_2387_proxy_ssl_context.py | 72 | except OSError: | CODE |
| HIGH | kubernetes/e2e_test/test_informer.py | 48 | except Exception: | CODE |
| HIGH | kubernetes/e2e_test/base.py | 40 | except urllib3.exceptions.HTTPError: | CODE |
| HIGH | kubernetes/watch/watch_test.py | 451 | except KeyError: | CODE |
| HIGH | kubernetes/watch/watch_test.py | 502 | except client.rest.ApiException: | CODE |
| HIGH | kubernetes/watch/watch_test.py | 529 | except client.rest.ApiException: | CODE |
| HIGH | kubernetes/watch/watch.py | 109 | except Exception: | CODE |
| HIGH | kubernetes/client/rest.py | 85 | except ValueError: | CODE |
| HIGH | kubernetes/client/exceptions.py | 128 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | kubernetes/aio/watch/watch_test.py | 415 | '{"creationTimestamp":null}, "spec": ' | CODE |
| HIGH⚡ | kubernetes/aio/watch/watch_test.py | 416 | '{"containers":null}}}}}', | CODE |
| HIGH | kubernetes/aio/client/models/v1_validation_rule.py | 111 | rule: StrictStr = Field(description="Rule represents the expression which will be evaluated by CEL. ref: https://git | CODE |
| HIGH | …els/v1_pod_failure_policy_on_exit_codes_requirement.py | 106 | container_name: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("containerName", "container_ | CODE |
| HIGH | kubernetes/aio/client/models/v1_success_policy_rule.py | 106 | succeeded_count: Optional[StrictInt] = Field(default=None, validation_alias=AliasChoices("succeededCount", "succeede | CODE |
| HIGH | kubernetes/aio/client/models/v1_success_policy_rule.py | 107 | succeeded_indexes: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("succeededIndexes", "succ | CODE |
| HIGH⚡ | kubernetes/watch/watch_test.py | 417 | '"metadata":{},"spec":{"containers":null}}},"status":{}}}', | CODE |
| HIGH | kubernetes/client/models/v1_validation_rule.py | 111 | rule: StrictStr = Field(description="Rule represents the expression which will be evaluated by CEL. ref: https://git | CODE |
| HIGH | …els/v1_pod_failure_policy_on_exit_codes_requirement.py | 106 | container_name: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("containerName", "container_ | CODE |
| HIGH | kubernetes/client/models/v1_success_policy_rule.py | 106 | succeeded_count: Optional[StrictInt] = Field(default=None, validation_alias=AliasChoices("succeededCount", "succeede | CODE |
| HIGH | kubernetes/client/models/v1_success_policy_rule.py | 107 | succeeded_indexes: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("succeededIndexes", "succ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples_asyncio/pod_exec.py | 64 | CODE | |
| LOW | examples/pod_logs_non_blocking.py | 17 | CODE | |
| LOW | examples/pod_portforward.py | 60 | CODE | |
| LOW | examples/pod_portforward.py | 128 | CODE | |
| LOW | examples/metrics_example.py | 123 | CODE | |
| LOW | examples/pod_logs.py | 22 | CODE | |
| LOW | kubernetes/dynamic/discovery.py | 112 | CODE | |
| LOW | kubernetes/dynamic/discovery.py | 254 | CODE | |
| LOW | kubernetes/dynamic/discovery.py | 303 | CODE | |
| LOW | kubernetes/dynamic/discovery.py | 364 | CODE | |
| LOW | kubernetes/dynamic/discovery.py | 389 | CODE | |
| LOW | kubernetes/test/test_generated_api.py | 318 | CODE | |
| LOW | kubernetes/test/test_generated_api.py | 363 | CODE | |
| LOW | kubernetes/test/test_generated_api.py | 482 | CODE | |
| LOW | kubernetes/config/kube_config.py | 439 | CODE | |
| LOW | kubernetes/config/exec_provider.py | 71 | CODE | |
| LOW | kubernetes/config/kube_config_test.py | 377 | CODE | |
| LOW | kubernetes/config/kube_config_test.py | 404 | CODE | |
| LOW | kubernetes/stream/ws_client.py | 526 | CODE | |
| LOW | kubernetes/stream/ws_client.py | 632 | CODE | |
| LOW | kubernetes/stream/ws_client.py | 52 | CODE | |
| LOW | kubernetes/stream/ws_client.py | 104 | CODE | |
| LOW | kubernetes/stream/ws_client.py | 213 | CODE | |
| LOW | kubernetes/stream/ws_client.py | 424 | CODE | |
| LOW | kubernetes/aio/dynamic/discovery.py | 130 | CODE | |
| LOW | kubernetes/aio/dynamic/discovery.py | 280 | CODE | |
| LOW | kubernetes/aio/dynamic/discovery.py | 328 | CODE | |
| LOW | kubernetes/aio/dynamic/discovery.py | 391 | CODE | |
| LOW | kubernetes/aio/dynamic/discovery.py | 416 | CODE | |
| LOW | kubernetes/aio/test/test_generated_api.py | 152 | CODE | |
| LOW | kubernetes/aio/config/kube_config.py | 324 | CODE | |
| LOW | kubernetes/aio/config/kube_config_test.py | 294 | CODE | |
| LOW | kubernetes/aio/config/kube_config_test.py | 319 | CODE | |
| LOW | kubernetes/aio/stream/ws_client.py | 99 | CODE | |
| LOW | kubernetes/aio/client/rest.py | 166 | CODE | |
| LOW | kubernetes/aio/client/api_client.py | 317 | CODE | |
| LOW | kubernetes/aio/client/api_client.py | 373 | CODE | |
| LOW | kubernetes/aio/client/api_client.py | 466 | CODE | |
| LOW | kubernetes/aio/client/api_client.py | 521 | CODE | |
| LOW | kubernetes/aio/client/api_client.py | 558 | CODE | |
| LOW | kubernetes/aio/client/api_client.py | 602 | CODE | |
| LOW | kubernetes/informer/informer.py | 238 | CODE | |
| LOW | kubernetes/e2e_test/test_client.py | 319 | CODE | |
| LOW | kubernetes/watch/watch.py | 136 | CODE | |
| LOW | kubernetes/watch/watch.py | 171 | CODE | |
| LOW | kubernetes/client/rest.py | 62 | CODE | |
| LOW | kubernetes/client/rest.py | 193 | CODE | |
| LOW | kubernetes/client/api_client.py | 389 | CODE | |
| LOW | kubernetes/client/api_client.py | 445 | CODE | |
| LOW | kubernetes/client/api_client.py | 538 | CODE | |
| LOW | kubernetes/client/api_client.py | 593 | CODE | |
| LOW | kubernetes/client/api_client.py | 630 | CODE | |
| LOW | kubernetes/client/api_client.py | 674 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kubernetes/dynamic/client.py | 36 | __all__ = [ | CODE |
| LOW | kubernetes/config/__init__.py | 23 | __all__ = [ | CODE |
| LOW | kubernetes/stream/__init__.py | 17 | __all__ = [ | CODE |
| LOW | kubernetes/aio/__init__.py | 27 | __all__ = ["client", "config", "dynamic", "leaderelection", "stream", "utils", "watch"] | CODE |
| LOW | kubernetes/aio/dynamic/discovery.py | 37 | logger = logging.getLogger(__name__) | CODE |
| LOW | kubernetes/aio/dynamic/client.py | 36 | __all__ = [ | CODE |
| LOW | kubernetes/aio/config/kube_config.py | 42 | logger = logging.getLogger(__name__) | CODE |
| LOW | kubernetes/aio/config/__init__.py | 25 | __all__ = [ | CODE |
| LOW | kubernetes/aio/stream/__init__.py | 17 | __all__ = [ | CODE |
| LOW | kubernetes/aio/utils/__init__.py | 28 | __all__ = [ | CODE |
| LOW | kubernetes/aio/leaderelection/leaderelection.py | 29 | logger = logging.getLogger(__name__) | CODE |
| LOW | …netes/aio/leaderelection/resourcelock/configmaplock.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | kubernetes/aio/leaderelection/resourcelock/leaselock.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | kubernetes/aio/watch/__init__.py | 17 | __all__ = [ | CODE |
| LOW | kubernetes/aio/client/configuration.py | 437 | def set_default(cls, default: Optional[Self]) -> None: | CODE |
| LOW | kubernetes/aio/client/__init__.py | 20 | __all__ = [ | CODE |
| LOW | kubernetes/aio/client/models/__init__.py | 15 | __all__ = [ | CODE |
| LOW | kubernetes/aio/client/api/__init__.py | 3 | __all__ = [ | CODE |
| LOW | kubernetes/utils/__init__.py | 30 | __all__ = [ | CODE |
| LOW | kubernetes/informer/__init__.py | 18 | __all__ = [ | CODE |
| LOW | kubernetes/informer/informer.py | 31 | logger = logging.getLogger(__name__) | CODE |
| LOW | kubernetes/watch/__init__.py | 17 | __all__ = [ | CODE |
| LOW | kubernetes/client/configuration.py | 440 | def set_default(cls, default: Optional[Self]) -> None: | CODE |
| LOW | kubernetes/client/__init__.py | 20 | __all__ = [ | CODE |
| LOW | kubernetes/client/models/__init__.py | 15 | __all__ = [ | CODE |
| LOW | kubernetes/client/api/__init__.py | 3 | __all__ = [ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | kubernetes/test/test_informer.py | 536 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | kubernetes/test/test_informer.py | 539 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | kubernetes/test/test_informer.py | 893 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | kubernetes/test/test_informer.py | 895 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | kubernetes/e2e_test/test_informer.py | 69 | # ------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | kubernetes/utils/metrics.py | 33 | Fetch current resource usage for all cluster nodes. Retrieves CPU and memory consumption metrics from the | STRING |
| HIGH | kubernetes/utils/metrics.py | 82 | Fetch current resource usage for pods in a namespace. Retrieves CPU and memory consumption metrics from th | STRING |
| HIGH | kubernetes/utils/duration.py | 32 | Parse GEP-2257 Duration format to a datetime.timedelta object. The GEP-2257 Duration format is a restricted fo | STRING |
| HIGH | kubernetes/utils/duration.py | 84 | Format a datetime.timedelta object to GEP-2257 Duration format. The GEP-2257 Duration format is a restricted f | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | examples/pod_logs_non_blocking.py | 32 | resp._fp.fp.raw._sock.settimeout(1) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/release.sh | 221 | # Check if there is any API change, then commit | COMMENT |
| LOW | kubernetes/dynamic/discovery.py | 264 | # Check if we've requested resources for this group | COMMENT |
| LOW | kubernetes/aio/dynamic/discovery.py | 289 | # Check if we've requested resources for this group | COMMENT |
| LOW | kubernetes/aio/leaderelection/leaderelection.py | 133 | # Check if lock is created | COMMENT |
| LOW | kubernetes/leaderelection/leaderelection.py | 123 | # Check if lock is created | COMMENT |
| LOW | kubernetes/watch/watch_test.py | 593 | # Print outputs | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | kubernetes/aio/client/rest.py | 252 | # Content-Type which generated by aiohttp | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | kubernetes/aio/docs/V1StatefulSetOrdinals.md | 9 | **start** | **int** | start is the number representing the first replica's index. It may be used to number replicas | CODE |
| MEDIUM | kubernetes/docs/V1StatefulSetOrdinals.md | 9 | **start** | **int** | start is the number representing the first replica's index. It may be used to number replicas | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/release.sh | 63 | # Usage: | COMMENT |